diff options
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index de67a314631..56c1cebdb72 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -2015,7 +2015,8 @@ int subselect_uniquesubquery_engine::exec() table->file->ha_index_init(tab->ref.key, 0); error= table->file->index_read(table->record[0], tab->ref.key_buff, - tab->ref.key_length,HA_READ_KEY_EXACT); + tab_to_keypart_map(tab), + HA_READ_KEY_EXACT); if (error && error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE) error= report_error(table, error); @@ -2124,7 +2125,8 @@ int subselect_indexsubquery_engine::exec() table->file->ha_index_init(tab->ref.key, 1); error= table->file->index_read(table->record[0], tab->ref.key_buff, - tab->ref.key_length,HA_READ_KEY_EXACT); + tab_to_keypart_map(tab), + HA_READ_KEY_EXACT); if (error && error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE) error= report_error(table, error); |