mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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
This commit is contained in:
@@ -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++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user