diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-01-24 04:47:06 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-01-24 04:47:06 +0200 |
commit | d78dced1347fac1f512eb2cbfbba5cd49be51e0b (patch) | |
tree | 010c9b6551e99138894da0a3d1a902362d41ab4e | |
parent | 36b25ee59a4779e5f34c922bdf78360c58d4c108 (diff) | |
download | mariadb-git-d78dced1347fac1f512eb2cbfbba5cd49be51e0b.tar.gz |
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
-rw-r--r-- | sql/ha_innodb.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index c639431c0fa..e4ffeef85c3 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -1672,18 +1672,31 @@ build_template( 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++; |