16
16
# disabled keys during repair
18
create table t1(id int PRIMARY KEY, st varchar(10), KEY st_key(st));
18
create table t1(id int PRIMARY KEY, st varchar(10), KEY st_key(st)) ENGINE=MyISAM;
19
19
insert into t1 values(1, "One");
20
20
alter table t1 disable keys;
30
30
create table t1 engine=myisam SELECT 1,"table 1";
32
system echo 1 > $MYSQLTEST_VARDIR/master-data/test/t1.MYI ;
32
--system echo 1 > $MYSQLTEST_VARDIR/master-data/test/t1.MYI ;
33
# BUG: REPAIR returns Ok when it shouldn't
34
# https://bugs.launchpad.net/drizzle/+bug/310389
34
36
repair table t1 use_frm;
38
40
# BUG#18874 - Setting myisam_repair_threads > 1, index cardinality always 1
40
CREATE TABLE t1(a INT, KEY(a));
42
CREATE TABLE t1(a INT, KEY(a)) ENGINE=MyISAM;
41
43
INSERT INTO t1 VALUES(1),(2),(3),(4),(5);
42
SET myisam_repair_threads=2;
44
SET GLOBAL myisam_repair_threads=2;
44
46
SHOW INDEX FROM t1;
45
SET myisam_repair_threads=@@global.myisam_repair_threads;
47
SET GLOBAL myisam_repair_threads=1;
49
51
# BUG#22562 - REPAIR TABLE .. USE_FRM causes server crash on Windows and
50
52
# server hangs on Linux
52
CREATE TABLE t1(a INT);
54
CREATE TABLE t1(a INT) ENGINE=MyISAM;
54
56
REPAIR TABLE test.t1 USE_FRM;
59
61
# BUG#23175 - MYISAM crash/repair failed during repair
61
CREATE TABLE t1(a CHAR(255), KEY(a));
62
SET myisam_sort_buffer_size=4096;
63
CREATE TABLE t1(a CHAR(255), KEY(a)) ENGINE=MyISAM;
64
SET GLOBAL myisam_sort_buffer_size=4096;
65
SHOW VARIABLES LIKE "myisam_sort_buffer_size";
66
# fails with ER_NOT_KEYFILE but really 'myisam_sort_buffer_size is too small'
67
--error ER_NOT_KEYFILE
63
68
INSERT INTO t1 VALUES
64
69
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
65
70
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
77
82
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
78
83
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
79
84
('0'),('0'),('0'),('0'),('0'),('0'),('0');
80
SET myisam_repair_threads=2;
85
SET GLOBAL myisam_repair_threads=2;
82
SET myisam_repair_threads=@@global.myisam_repair_threads;
83
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
87
SET GLOBAL myisam_repair_threads=1;
88
SET GLOBAL myisam_sort_buffer_size=DEFAULT;
87
92
# BUG#31174 - "Repair" command on MyISAM crashes with small
88
93
# myisam_sort_buffer_size
90
CREATE TABLE t1(a CHAR(255), KEY(a));
91
SET myisam_sort_buffer_size=4496;
95
CREATE TABLE t1(a CHAR(255), KEY(a)) ENGINE=MyISAM;
96
SET GLOBAL myisam_sort_buffer_size=16384;
92
97
INSERT INTO t1 VALUES
93
98
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
94
99
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
106
111
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
107
112
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
108
113
('0'),('0'),('0'),('0'),('0'),('0'),('0');
109
SET myisam_repair_threads=2;
114
SET GLOBAL myisam_repair_threads=2;
111
SET myisam_repair_threads=@@global.myisam_repair_threads;
112
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
116
SET GLOBAL myisam_repair_threads=1;
117
SET GLOBAL myisam_sort_buffer_size=DEFAULT;
115
120
--echo End of 4.1 tests