1
drop table if exists t1;
2
create table t1 SELECT 1,"table 1";
3
repair table t1 use_frm;
4
Table Op Msg_type Msg_text
5
test.t1 repair warning Number of rows changed from 0 to 1
6
test.t1 repair status OK
7
alter table t1 ENGINE=HEAP;
8
repair table t1 use_frm;
9
Table Op Msg_type Msg_text
10
test.t1 repair note The storage engine for the table doesn't support repair
12
create table t1(id int PRIMARY KEY, st varchar(10), KEY st_key(st));
13
insert into t1 values(1, "One");
14
alter table t1 disable keys;
16
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
17
t1 0 PRIMARY 1 id A 1 NULL NULL BTREE
18
t1 1 st_key 1 st A NULL NULL NULL YES BTREE disabled
19
repair table t1 extended;
20
Table Op Msg_type Msg_text
21
test.t1 repair status OK
23
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
24
t1 0 PRIMARY 1 id A 1 NULL NULL BTREE
25
t1 1 st_key 1 st A NULL NULL NULL YES BTREE disabled
27
repair table t1 use_frm;
28
Table Op Msg_type Msg_text
29
test.t1 repair Error Table 'test.t1' doesn't exist
30
test.t1 repair error Corrupt
31
create table t1 engine=myisam SELECT 1,"table 1";
34
Table Op Msg_type Msg_text
35
test.t1 repair Error Incorrect file format 't1'
36
test.t1 repair error Corrupt
37
repair table t1 use_frm;
38
Table Op Msg_type Msg_text
39
test.t1 repair warning Number of rows changed from 0 to 1
40
test.t1 repair status OK
42
CREATE TABLE t1(a INT, KEY(a));
43
INSERT INTO t1 VALUES(1),(2),(3),(4),(5);
44
SET myisam_repair_threads=2;
46
Table Op Msg_type Msg_text
47
test.t1 repair status OK
49
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
50
t1 1 a 1 a A 5 NULL NULL YES BTREE
51
SET myisam_repair_threads=@@global.myisam_repair_threads;
53
CREATE TABLE t1(a INT);
55
REPAIR TABLE test.t1 USE_FRM;
56
Table Op Msg_type Msg_text
57
test.t1 repair status OK
60
CREATE TABLE t1(a CHAR(255), KEY(a));
61
SET myisam_sort_buffer_size=4096;
63
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
64
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
65
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
66
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
67
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
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');
80
Error 1034 myisam_sort_buffer_size is too small
81
Error 1034 Number of rows changed from 0 to 157
82
SET myisam_repair_threads=2;
84
Table Op Msg_type Msg_text
85
test.t1 repair error myisam_sort_buffer_size is too small
86
test.t1 repair warning Number of rows changed from 0 to 157
87
test.t1 repair status OK
88
SET myisam_repair_threads=@@global.myisam_repair_threads;
89
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
91
CREATE TABLE t1(a CHAR(255), KEY(a));
92
SET myisam_sort_buffer_size=4496;
94
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
95
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
96
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
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');
110
SET myisam_repair_threads=2;
112
Table Op Msg_type Msg_text
113
test.t1 repair status OK
114
SET myisam_repair_threads=@@global.myisam_repair_threads;
115
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
118
DROP TABLE IF EXISTS tt1;
119
CREATE TEMPORARY TABLE tt1 (c1 INT);
120
REPAIR TABLE tt1 USE_FRM;
121
Table Op Msg_type Msg_text
122
tt1 repair error Cannot repair temporary table from .frm file