summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2010-03-16 21:33:56 +0400
committerSergey Vojtovich <svoj@sun.com>2010-03-16 21:33:56 +0400
commitae42e96d28074c7a4c9c959cb7bde08da85feb78 (patch)
tree41d38d2eb60a95fedc7e42faac88276ab60da460 /mysql-test
parent4a0dd699b1ad5cd2b5e16a6edb75da2fc584a5c5 (diff)
parent87e80b659330f8453b051714d33e28b3b83a2efd (diff)
downloadmariadb-git-ae42e96d28074c7a4c9c959cb7bde08da85feb78.tar.gz
Merge fix for BUG47444 to mysql-5.1-bugteam.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/myisam.result19
-rw-r--r--mysql-test/t/myisam.test14
2 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index ba417d54998..5b9745a7b81 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -2389,4 +2389,23 @@ SELECT * FROM t1, t1 AS a1 WHERE t1.a=1 AND a1.a=1;
a a
1 1
DROP TABLE t1;
+#
+# BUG#47444 - --myisam_repair_threads>1can result in all index
+# cardinalities=1
+#
+SET myisam_repair_threads=2;
+SET myisam_sort_buffer_size=4096;
+CREATE TABLE t1(a CHAR(255), KEY(a), KEY(a), KEY(a));
+INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(0),(1),(2),(3);
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
+CARDINALITY
+14
+14
+14
+DROP TABLE t1;
+SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
+SET myisam_repair_threads=@@global.myisam_repair_threads;
End of 5.1 tests
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 7dcfe058039..4abd7dd2b1b 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -1631,4 +1631,18 @@ INSERT INTO t1 VALUES('1');
SELECT * FROM t1, t1 AS a1 WHERE t1.a=1 AND a1.a=1;
DROP TABLE t1;
+--echo #
+--echo # BUG#47444 - --myisam_repair_threads>1can result in all index
+--echo # cardinalities=1
+--echo #
+SET myisam_repair_threads=2;
+SET myisam_sort_buffer_size=4096;
+CREATE TABLE t1(a CHAR(255), KEY(a), KEY(a), KEY(a));
+INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(0),(1),(2),(3);
+REPAIR TABLE t1;
+SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
+DROP TABLE t1;
+SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
+SET myisam_repair_threads=@@global.myisam_repair_threads;
+
--echo End of 5.1 tests