summaryrefslogtreecommitdiff
path: root/mysql-test/t/repair.test
diff options
context:
space:
mode:
authorunknown <svoj@may.pils.ru>2006-08-14 17:05:02 +0500
committerunknown <svoj@may.pils.ru>2006-08-14 17:05:02 +0500
commitf6d7985a5b4a5c7d94cb04ba003dfa411cf0d3f2 (patch)
treebf03933cdadf7c01941372b18ee76844aa412cff /mysql-test/t/repair.test
parenta2a5f2b53622af0933de757660428ba61737cb98 (diff)
downloadmariadb-git-f6d7985a5b4a5c7d94cb04ba003dfa411cf0d3f2.tar.gz
BUG#18874 - Setting myisam_repair_threads > 1, index cardinality always 1
Fixed by moving update_key_parts() down to be after write_index(). myisam/sort.c: write_index() collects index statistic which is further used in update_key_parts(). Thus update_key_parts() must be called after write_index(). mysql-test/r/repair.result: Test case for bug#18874. mysql-test/t/repair.test: Test case for bug#18874.
Diffstat (limited to 'mysql-test/t/repair.test')
-rw-r--r--mysql-test/t/repair.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test
index 5e39e0b6a50..f086d5b0c2a 100644
--- a/mysql-test/t/repair.test
+++ b/mysql-test/t/repair.test
@@ -34,4 +34,15 @@ repair table t1;
repair table t1 use_frm;
drop table t1;
+#
+# BUG#18874 - Setting myisam_repair_threads > 1, index cardinality always 1
+#
+CREATE TABLE t1(a INT, KEY(a));
+INSERT INTO t1 VALUES(1),(2),(3),(4),(5);
+SET myisam_repair_threads=2;
+REPAIR TABLE t1;
+SHOW INDEX FROM t1;
+SET myisam_repair_threads=@@global.myisam_repair_threads;
+DROP TABLE t1;
+
# End of 4.1 tests