Commit d78dced1 authored by unknown's avatar unknown

ha_innodb.cc:

  Temporary fix to make the new client/server protocol to work: fetch all columns in an index, even if not needed by the SELECT statement; Monty has to fix the parser to tell InnoDB what to fetch


sql/ha_innodb.cc:
  Temporary fix to make the new client/server protocol to work: fetch all columns in an index, even if not needed by the SELECT statement; Monty has to fix the parser to tell InnoDB what to fetch
parent 36b25ee5
......@@ -1671,19 +1671,32 @@ build_template(
templ = prebuilt->mysql_template + n_requested_fields;
field = table->field[i];
if (templ_type == ROW_MYSQL_REC_FIELDS
&& prebuilt->read_just_key
&& dict_index_get_nth_col_pos(index, i)
== ULINT_UNDEFINED) {
/* Skip a column which is not in the index */
goto skip_field;
}
/* TODO: we have removed temporarily the test of which columns
to fetch, until the new client/server protocol of 4.1
is fixed!!!!!!!!!!!!!!!!!
if (templ_type == ROW_MYSQL_REC_FIELDS
&& !(fetch_all_in_key &&
ULINT_UNDEFINED != dict_index_get_nth_col_pos(
index, i))
ULINT_UNDEFINED != dict_index_get_nth_col_pos(
index, i))
&& thd->query_id != field->query_id
&& thd->query_id != (field->query_id ^ MAX_ULONG_BIT)
&& thd->query_id !=
(field->query_id ^ (MAX_ULONG_BIT >> 1))) {
/* This field is not needed in the query, skip it */
goto skip_field;
}
*/
n_requested_fields++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment