summaryrefslogtreecommitdiff
path: root/mysql-test/t/myisam.test
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2010-03-12 14:43:30 +0400
committerSergey Vojtovich <svoj@sun.com>2010-03-12 14:43:30 +0400
commite0aadfd491700fc072ffee1e1612f52fa5fc39b1 (patch)
tree08c99f355e15327ea040ee174b8368ac0c48a628 /mysql-test/t/myisam.test
parentb182c9bd2030c3b3c548157d1bc4c01c306b2c5c (diff)
downloadmariadb-git-e0aadfd491700fc072ffee1e1612f52fa5fc39b1.tar.gz
BUG#47444 - --myisam_repair_threads>1can result in all
index cardinalities=1 Parallel repair didn't poroperly update index cardinality in certain cases. When myisam_sort_buffer_size is not enough to store all keys, index cardinality was updated before index was actually written, when no index statistic is available. mysql-test/r/myisam.result: A test case for BUG#47444. mysql-test/t/myisam.test: A test case for BUG#47444. storage/myisam/sort.c: update_key_parts() must be called after all index entries are written, when index statistic is available.
Diffstat (limited to 'mysql-test/t/myisam.test')
-rw-r--r--mysql-test/t/myisam.test14
1 files changed, 14 insertions, 0 deletions
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