1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fixed a bug in optimiser with MERGE tables with non-unique values

with aggregating functions.

This consistently crashed Mysql
This commit is contained in:
unknown
2002-06-15 20:59:42 +03:00
parent 451a5e510b
commit e9c43803dd
4 changed files with 26 additions and 4 deletions

View File

@ -152,11 +152,12 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
error=table->file->index_last(table->record[0]) !=0;
else
{
(void) table->file->index_read(table->record[0], key_buff,
error= table->file->index_read(table->record[0], key_buff,
ref.key_length,
HA_READ_AFTER_KEY);
error=table->file->index_prev(table->record[0]) ||
key_cmp(table,key_buff,ref.key,ref.key_length);
if (!error)
error=table->file->index_prev(table->record[0]) ||
key_cmp(table,key_buff,ref.key,ref.key_length);
}
if (table->key_read)
{