summaryrefslogtreecommitdiff
path: root/mysql-test/t/count_distinct2.test
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-05-24 17:06:53 -0600
committerunknown <sasha@mysql.sashanet.com>2001-05-24 17:06:53 -0600
commitb7b409b76ee4c2817a882b3f08cb30890dd8532a (patch)
tree0556f9414f47140d32040504811d813034d86f7d /mysql-test/t/count_distinct2.test
parenta895b7b447e3b8749f9f14447f2cb72e7d062546 (diff)
downloadmariadb-git-b7b409b76ee4c2817a882b3f08cb30890dd8532a.tar.gz
handle tree overflow in count(distinct)
test heap table/tree overflow in count(distinct) mysql-test/r/count_distinct2.result: added test for tree/heap table overflow mysql-test/t/count_distinct2.test: test tree/heap table overflow sql/item_sum.cc: handle tree overflow in count(distinct) sql/item_sum.h: t
Diffstat (limited to 'mysql-test/t/count_distinct2.test')
-rw-r--r--mysql-test/t/count_distinct2.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/count_distinct2.test b/mysql-test/t/count_distinct2.test
index 5ddd96198fe..2447a7c3611 100644
--- a/mysql-test/t/count_distinct2.test
+++ b/mysql-test/t/count_distinct2.test
@@ -43,3 +43,32 @@ select count(distinct n1), count(distinct n2) from t1;
select count(distinct n2), n1 from t1 group by n1;
drop table t1;
+
+# test the converstion from tree to MyISAM
+create table t1 (n int);
+let $1=5000;
+while ($1)
+{
+ eval insert into t1 values($1);
+ dec $1;
+}
+
+flush status;
+select count(distinct n) from t1;
+show status like 'Created_tmp_disk_tables';
+drop table t1;
+
+#test conversion from heap to MyISAM
+create table t1 (s text);
+let $1=5000;
+while ($1)
+{
+ eval insert into t1 values('$1');
+ dec $1;
+}
+
+flush status;
+select count(distinct s) from t1;
+show status like 'Created_tmp_disk_tables';
+drop table t1;
+