summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_group.test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-06-10 10:59:55 +0300
committerunknown <bell@sanja.is.com.ua>2004-06-10 10:59:55 +0300
commitcc694eba51d8b2b047022facfcbf61aebb09df40 (patch)
tree843e4e7d10f5b0100a82cd522e1a21416d20f204 /mysql-test/t/func_group.test
parentcf498610a955f11c5c03c1cdf784e8b7319630da (diff)
downloadmariadb-git-cc694eba51d8b2b047022facfcbf61aebb09df40.tar.gz
cleunup() of count() and max()/min() added (BUG#2687)
mysql-test/r/func_group.result: test of optimized aggregate function re-execution mysql-test/t/func_group.test: test of optimized aggregate function re-execution sql/item_sum.cc: cleunup() added sql/item_sum.h: cleunup() added
Diffstat (limited to 'mysql-test/t/func_group.test')
-rw-r--r--mysql-test/t/func_group.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index 7966a2262f4..74f4c1bad44 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -396,3 +396,25 @@ create table t1 (a int);
select variance(2) from t1;
select stddev(2) from t1;
drop table t1;
+
+
+#
+# cleunup() of optimized away count(*) and max/min
+#
+create table t1 (a int);
+insert into t1 values (1),(2);
+prepare stmt1 from 'SELECT COUNT(*) FROM t1';
+execute stmt1;
+execute stmt1;
+execute stmt1;
+deallocate prepare stmt1;
+drop table t1;
+
+create table t1 (a int, primary key(a));
+insert into t1 values (1),(2);
+prepare stmt1 from 'SELECT max(a) FROM t1';
+execute stmt1;
+execute stmt1;
+execute stmt1;
+deallocate prepare stmt1;
+drop table t1;