Commit 9dd13a9a authored by serg@serg.mysql.com's avatar serg@serg.mysql.com

backported MERGE+MAX bugfix from 4.0

parent 92d6bdc1
...@@ -165,10 +165,9 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) ...@@ -165,10 +165,9 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
error=table->file->index_last(table->record[0]) !=0; error=table->file->index_last(table->record[0]) !=0;
else else
{ {
(void) table->file->index_read(table->record[0], key_buff, error = table->file->index_read(table->record[0], key_buff,
ref.key_length, ref.key_length,
HA_READ_AFTER_KEY); HA_READ_PREFIX_LAST) ||
error=table->file->index_prev(table->record[0]) ||
key_cmp(table,key_buff,ref.key,ref.key_length); key_cmp(table,key_buff,ref.key,ref.key_length);
} }
if (table->key_read) if (table->key_read)
......
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