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/r/count_distinct.result | |
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/r/count_distinct.result')
-rw-r--r-- | mysql-test/r/count_distinct.result | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/count_distinct.result b/mysql-test/r/count_distinct.result index d55a232c715..760b2710586 100644 --- a/mysql-test/r/count_distinct.result +++ b/mysql-test/r/count_distinct.result @@ -106,3 +106,28 @@ count(distinct user_id) 17 drop table t1; set @@tmp_table_size = default; +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; +count(distinct a) +10 +drop table t1; +set @@tmp_table_size = default; |