6
drop table if exists t1;
9
create table t1 ENGINE=MyISAM SELECT 1,"table 1";
10
repair table t1 use_frm;
11
alter table t1 ENGINE=HEAP;
12
repair table t1 use_frm;
16
# disabled keys during repair
18
create table t1(id int PRIMARY KEY, st varchar(10), KEY st_key(st)) ENGINE=MyISAM;
19
insert into t1 values(1, "One");
20
alter table t1 disable keys;
22
repair table t1 extended;
28
repair table t1 use_frm;
30
create table t1 engine=myisam SELECT 1,"table 1";
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
36
repair table t1 use_frm;
40
# BUG#18874 - Setting myisam_repair_threads > 1, index cardinality always 1
42
CREATE TABLE t1(a INT, KEY(a)) ENGINE=MyISAM;
43
INSERT INTO t1 VALUES(1),(2),(3),(4),(5);
44
SET GLOBAL myisam_repair_threads=2;
47
SET GLOBAL myisam_repair_threads=1;
51
# BUG#22562 - REPAIR TABLE .. USE_FRM causes server crash on Windows and
52
# server hangs on Linux
54
CREATE TABLE t1(a INT) ENGINE=MyISAM;
56
REPAIR TABLE test.t1 USE_FRM;
61
# BUG#23175 - MYISAM crash/repair failed during repair
63
CREATE TABLE t1(a CHAR(255), KEY(a)) ENGINE=MyISAM;
64
SET myisam_sort_buffer_size=4096;
65
# fails with ER_NOT_KEYFILE but really 'myisam_sort_buffer_size is too small'
66
--error ER_NOT_KEYFILE
68
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
69
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
70
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
71
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
72
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
73
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
74
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
75
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
76
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
77
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
78
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
79
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
80
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
81
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
82
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
83
('0'),('0'),('0'),('0'),('0'),('0'),('0');
84
SET GLOBAL myisam_repair_threads=2;
86
SET GLOBAL myisam_repair_threads=1;
87
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
91
# BUG#31174 - "Repair" command on MyISAM crashes with small
92
# myisam_sort_buffer_size
94
CREATE TABLE t1(a CHAR(255), KEY(a)) ENGINE=MyISAM;
95
SET myisam_sort_buffer_size=16384;
97
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
98
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
99
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
100
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
101
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
102
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
103
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
104
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
105
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
106
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
107
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
108
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
109
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
110
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
111
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
112
('0'),('0'),('0'),('0'),('0'),('0'),('0');
113
SET GLOBAL myisam_repair_threads=2;
115
SET GLOBAL myisam_repair_threads=1;
116
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
119
--echo End of 4.1 tests
123
# Bug#18775 - Temporary table from alter table visible to other threads
125
# REPAIR TABLE ... USE_FRM on temporary table crashed the table or server.
127
DROP TABLE IF EXISTS tt1;
129
CREATE TEMPORARY TABLE tt1 (c1 INT);
130
REPAIR TABLE tt1 USE_FRM;