summaryrefslogtreecommitdiff
path: root/mysql-test/r/distinct.result
diff options
context:
space:
mode:
authorKristofer Pettersson <kristofer.pettersson@sun.com>2009-09-15 09:33:25 +0200
committerKristofer Pettersson <kristofer.pettersson@sun.com>2009-09-15 09:33:25 +0200
commitd98625d5ca09532609cf91b6a1b63fe1638f16aa (patch)
treee2b6157a2db75a4dc07850ee7a3c74ab9822b71f /mysql-test/r/distinct.result
parent76b8bd35898ea74734b4c57c10bdb2928dd7dd55 (diff)
parent63a81c09946be5f008eb3423e24db93dc72a3fe8 (diff)
downloadmariadb-git-d98625d5ca09532609cf91b6a1b63fe1638f16aa.tar.gz
autocommit
Diffstat (limited to 'mysql-test/r/distinct.result')
-rw-r--r--mysql-test/r/distinct.result30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result
index e0324af8cfd..b1cb70fa43c 100644
--- a/mysql-test/r/distinct.result
+++ b/mysql-test/r/distinct.result
@@ -763,4 +763,34 @@ a b d c
1 2 0 2
1 2 0 3
DROP TABLE t1;
+#
+# Bug #46159: simple query that never returns
+#
+SET @old_max_heap_table_size = @@max_heap_table_size;
+SET @@max_heap_table_size = 16384;
+SET @old_sort_buffer_size = @@sort_buffer_size;
+SET @@sort_buffer_size = 32804;
+CREATE TABLE t1(c1 int, c2 VARCHAR(20));
+INSERT INTO t1 VALUES (1, '1'), (1, '1'), (2, '2'), (3, '1'), (3, '1'), (4, '4');
+INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1;
+INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1;
+INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1;
+INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1;
+INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1;
+INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1;
+INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1;
+INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1;
+SELECT c1, c2, COUNT(*) FROM t1 GROUP BY c1 LIMIT 4;
+c1 c2 COUNT(*)
+1 1 2
+2 2 1
+3 1 2
+4 4 1
+SELECT DISTINCT c2 FROM t1 GROUP BY c1 HAVING COUNT(*) > 1;
+c2
+1
+5
+DROP TABLE t1;
+SET @@sort_buffer_size = @old_sort_buffer_size;
+SET @@max_heap_table_size = @old_max_heap_table_size;
End of 5.1 tests