1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge fix for BUG47444 to mysql-5.1-bugteam.

This commit is contained in:
Sergey Vojtovich
2010-03-16 18:06:03 +04:00
4 changed files with 43 additions and 10 deletions

View File

@ -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

View File

@ -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