summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.fi>2001-03-10 17:05:10 +0200
committerunknown <monty@donna.mysql.fi>2001-03-10 17:05:10 +0200
commit74ea7333032ebc1d396f1939fd5a84c7a6ecc50c (patch)
treecc1b41b3c722e4793c0fc03a04d720d88cfa332d /sql/opt_sum.cc
parent7957ec7e339177d246a34491ccdda9851fc00956 (diff)
downloadmariadb-git-74ea7333032ebc1d396f1939fd5a84c7a6ecc50c.tar.gz
Fixed bug in MAX() optimizing for BDB tables
Docs/manual.texi: Updated changelog mysql-test/README: Added reference to manual mysql-test/r/bdb.result: Added test for MAX() bug mysql-test/r/innobase.result: Added test for MAX() bug mysql-test/t/bdb.test: Added test for MAX() bug mysql-test/t/innobase.test: Added test for MAX() bug sql-bench/server-cfg.sh: Don't create big blobs with innobase sql/ha_berkeley.cc: Fixed bug in MAX() optimizing BitKeeper/etc/ignore: Added sql/.gdbinit to the ignore list sql/ha_innobase.h: Fixed bug in MAX() optimizing sql/handler.h: Fixed bug in MAX() optimizing sql/opt_sum.cc: Fixed bug in MAX() optimizing
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index d56bf68db62..df49d52d54a 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -141,6 +141,11 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
break;
}
TABLE *table=((Item_field*) expr)->field->table;
+ if ((table->file->option_flag() & HA_NOT_READ_AFTER_KEY))
+ {
+ const_result=0;
+ break;
+ }
bool error=table->file->index_init((uint) ref.key);
if (!ref.key_length)