summaryrefslogtreecommitdiff
path: root/mysql-test/t/count_distinct.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-07-12 19:20:52 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-12 19:20:52 +0200
commite7f51e5d269ba8adb917226724564274a57d07b3 (patch)
tree0fc76e75f3893aeb28b39faedb24fa073b486a69 /mysql-test/t/count_distinct.test
parent181d9d2892739629382727cf956364106c947ea2 (diff)
downloadmariadb-git-e7f51e5d269ba8adb917226724564274a57d07b3.tar.gz
MDEV-12136 SELECT COUNT(DISTINCT) returns the wrong value when tmp_table_size is limited
use the correct value for the merge_buffer size, max_in_memory_size is too small and merge_walk() fails. also: remove a cast.
Diffstat (limited to 'mysql-test/t/count_distinct.test')
-rw-r--r--mysql-test/t/count_distinct.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/count_distinct.test b/mysql-test/t/count_distinct.test
index 10b4ac6f0e7..ac97cdba357 100644
--- a/mysql-test/t/count_distinct.test
+++ b/mysql-test/t/count_distinct.test
@@ -107,3 +107,17 @@ create view v1 as select * from t1;
select count(distinct i) from v1;
drop table t1;
drop view v1;
+
+#
+# MDEV-12136 SELECT COUNT(DISTINCT) returns the wrong value when tmp_table_size is limited
+#
+create table t1 (user_id char(64) character set utf8);
+insert t1 values(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17);
+set @@tmp_table_size = 1024;
+select count(distinct user_id) from t1;
+drop table t1;
+set @@tmp_table_size = default;
+
+#
+# End of 5.5 tests
+#