diff options
author | Varun Gupta <varunraiko1803@gmail.com> | 2017-08-08 21:13:45 +0530 |
---|---|---|
committer | Varun Gupta <varunraiko1803@gmail.com> | 2017-08-09 18:09:04 +0530 |
commit | 0739179857699d68758ff2e56e9414735546ded6 (patch) | |
tree | 53568b508da617154d5cb0747e21a4400bdcd421 /mysql-test/t/count_distinct.test | |
parent | c8a0244e957bc4beff453f09c881bb51752d682c (diff) | |
download | mariadb-git-0739179857699d68758ff2e56e9414735546ded6.tar.gz |
MDEV-13458: Wrong result for aggregate function with distinct clause when the value for tmp_table_size is small
Fixed by making sure that the sort buffer would have atleast MERGEBUFF2 keys.
Also fixed MDEV-13457 by making sure that an empty tree is never dumped to the disk
Diffstat (limited to 'mysql-test/t/count_distinct.test')
-rw-r--r-- | mysql-test/t/count_distinct.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/count_distinct.test b/mysql-test/t/count_distinct.test index a00574b6cba..86045e862e7 100644 --- a/mysql-test/t/count_distinct.test +++ b/mysql-test/t/count_distinct.test @@ -121,5 +121,34 @@ drop table t1; set @@tmp_table_size = default; # +# MDEV-13457: Wrong result for aggregate function with distinct clause when the value for +# tmp_table_size is small +# + +create table t1 ( +a VARCHAR(1020), +b int +); +insert into t1 values +( 0 , 1 ), +( 1 , 2 ), +( 2 , 3 ), +( 3 , 4 ), +( 4 , 5 ), +( 5 , 6 ), +( 6 , 7 ), +( 7 , 8 ), +( 8 , 9 ), +( 9 , 10 ), +( 0 , 11 ), +( 1 , 12 ), +( 2 , 13 ), +( 3 , 14 ); +set @@tmp_table_size=1024; +select count(distinct a) from t1; +drop table t1; +set @@tmp_table_size = default; + +# # End of 5.5 tests # |