diff options
author | unknown <serg@serg.mysql.com> | 2003-01-17 12:48:47 +0100 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2003-01-17 12:48:47 +0100 |
commit | 92d93cae72d8d24595438da31cf8acabe8c6a724 (patch) | |
tree | 91950cbee7233472497c719a5aad8f05f3d7c940 /sql | |
parent | 6878f548ca8b40253d8c22abe5014fa684ebf5bb (diff) | |
parent | 22b693d80b9ee7a763ae3fa6d33a94e01bb7616d (diff) | |
download | mariadb-git-92d93cae72d8d24595438da31cf8acabe8c6a724.tar.gz |
Merge work:/home/bk/mysql-4.0
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0
Diffstat (limited to 'sql')
-rw-r--r-- | sql/opt_sum.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index 4b6a196051e..ecfa97586e9 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -38,7 +38,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) table_map removed_tables=0; Item *item; COND *org_conds= conds; - + /* Add all ON conditions to WHERE condition */ for (TABLE_LIST *tl=tables; tl ; tl= tl->next) { @@ -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; 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]) || + HA_READ_PREFIX_LAST) || key_cmp(table,key_buff,ref.key,ref.key_length); } if (table->key_read) |