summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-07-03 20:57:51 +0500
committerunknown <hf@deer.(none)>2003-07-03 20:57:51 +0500
commit8d7eb4a0e5b7d71e09c689fcc0318382c780302e (patch)
treed26249584a7ab19505e0e38ce81473b88f0e4a2b /sql/sql_handler.cc
parentfd0ecf1e47baca9e288e8cf038ca731962afdf14 (diff)
downloadmariadb-git-8d7eb4a0e5b7d71e09c689fcc0318382c780302e.tar.gz
Proposed fix for #751
Fields in key_expr (mysql_ha_read) wasn't linked to tables. Hmm. How did it work at all? mysql-test/r/alias.result: It's better to delete table after the test mysql-test/r/handler.result: appropriate result mysql-test/t/alias.test: it's better to drop table after test mysql-test/t/handler.test: test case for #751 sql/sql_handler.cc: fix_fields called
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index a98b6c13a00..c80c0444cb5 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -193,6 +193,8 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
Item *item;
for (key_len=0 ; (item=it_ke++) ; key_part++)
{
+ if (item->fix_fields(thd, tables))
+ return -1;
item->save_in_field(key_part->field, 1);
key_len+=key_part->store_length;
}