diff options
Diffstat (limited to 'mysql-test/t/func_group.test')
-rw-r--r-- | mysql-test/t/func_group.test | 22 |
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; |