#At file:///Users/pcrews/usr/local/bin/data1/work/count/mysql-5.0-new/ based on revid:sergey.glukhov@stripped
2725 Patrick Crews 2009-04-16
Bug#26887 - main.count_distinct3 fails randomly
Made efforts to streamline how we increase the size of our test table.
Incorporating review feedback, the run time of the test has been reduced by ~60%
While this does not guarantee that the test will not timeout anymore (the cause of the random failures),
it does significantly reduce the chances of a timeout occurring.
modified:
mysql-test/r/count_distinct3.result
mysql-test/t/count_distinct3.test
=== modified file 'mysql-test/r/count_distinct3.result'
--- a/mysql-test/r/count_distinct3.result 2003-11-20 23:53:01 +0000
+++ b/mysql-test/r/count_distinct3.result 2009-04-16 12:45:01 +0000
@@ -2,7 +2,6 @@ DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (id INTEGER, grp TINYINT, id_rev INTEGER);
SELECT COUNT(*) FROM t1;
COUNT(*)
-4181000
+4201000
SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp;
DROP TABLE t1;
-set @@read_buffer_size=default;
=== modified file 'mysql-test/t/count_distinct3.test'
--- a/mysql-test/t/count_distinct3.test 2006-10-03 07:03:35 +0000
+++ b/mysql-test/t/count_distinct3.test 2009-04-16 12:45:01 +0000
@@ -1,4 +1,4 @@
-#
+# Bug #958 a big table without indices and select with group by doesnt work
# this is a test for error 1032 in count(distinct) + group by, introduced in
# mysql-4.1
#
@@ -21,27 +21,15 @@ while ($1)
INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
dec $1;
}
-set @@read_buffer_size=2*1024*1024;
-CREATE TABLE t2 SELECT * FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-DROP TABLE t2;
+
+# We increase the size of t1 here.
+SET session myisam_sort_buffer_size=20000000;
+INSERT INTO t1
+SELECT A.id, A.grp, A.id_rev
+FROM
+ t1 A,
+ (SELECT * FROM t1 B LIMIT 100) B,
+ (SELECT * FROM t1 Z LIMIT 42) Z;
--enable_query_log
SELECT COUNT(*) FROM t1;
@@ -55,6 +43,4 @@ SELECT COUNT(DISTINCT id) FROM t1 GROUP
--enable_result_log
DROP TABLE t1;
-set @@read_buffer_size=default;
-
# End of 4.1 tests
Attachment: [text/bzr-bundle] bzr/patrick.crews@sun.com-20090416124501-3m3ok2xg2n1zdjvw.bundle
| Thread |
|---|
| • bzr commit into mysql-5.0-bugteam branch (patrick.crews:2725) Bug#26887 | Patrick Crews | 16 Apr |