summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-01-18 03:13:37 +0200
committerunknown <monty@mashka.mysql.fi>2003-01-18 03:13:37 +0200
commit931c816271018c30210afc3f6577821185c3d465 (patch)
treeb24bce166fd5affbcc506bbc7d70c2c7ef00f561 /sql/opt_sum.cc
parent8624debf4ec73b3c35b4178249d7bf566a9ab892 (diff)
parent33687be627386b540fac78ed709f18b9fae9df17 (diff)
downloadmariadb-git-931c816271018c30210afc3f6577821185c3d465.tar.gz
Merge with 4.0.9
BitKeeper/etc/ignore: auto-union client/mysqltest.c: Auto merged configure.in: Auto merged BitKeeper/deleted/.del-mutex.h~d3ae7a2977a68137: Auto merged BitKeeper/deleted/.del-mutex.m4~a13383cde18a64e1: Auto merged innobase/btr/btr0cur.c: Auto merged innobase/btr/btr0pcur.c: Auto merged innobase/log/log0log.c: Auto merged innobase/srv/srv0srv.c: Auto merged innobase/trx/trx0trx.c: Auto merged myisam/mi_create.c: Auto merged myisam/mi_unique.c: Auto merged myisam/myisamchk.c: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/group_by.result: Auto merged mysql-test/r/merge.result: Auto merged mysql-test/r/null.result: Auto merged mysql-test/t/group_by.test: Auto merged mysql-test/t/merge.test: Auto merged mysql-test/t/null.test: Auto merged scripts/mysql_fix_privilege_tables.sh: Auto merged sql/field_conv.cc: Auto merged sql/ha_myisammrg.cc: Auto merged sql/mysqld.cc: Auto merged sql/net_serv.cc: Auto merged sql/opt_sum.cc: Auto merged sql/protocol.cc: Auto merged sql/sql_db.cc: Auto merged sql/sql_load.cc: Auto merged sql/sql_table.cc: Auto merged strings/Makefile.am: Auto merged libmysql/Makefile.shared: merge libmysql/libmysql.def: merge sql/ha_innodb.cc: merge sql/item_cmpfunc.cc: merge sql/log_event.cc: merge sql/sql_handler.cc: merge
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index b1bb36353bf..492834b5bb9 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)