~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/repair.result

  • Committer: Jay Pipes
  • Date: 2009-02-28 17:49:22 UTC
  • mto: (910.2.6 mordred-noatomics)
  • mto: This revision was merged to the branch mainline in revision 908.
  • Revision ID: jpipes@serialcoder-20090228174922-jczgt4d0662fqmnf
Merging in old r902 temporal changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1;
 
2
create table t1 ENGINE=MyISAM 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
 
11
drop table t1;
 
12
create table t1(id int PRIMARY KEY, st varchar(10), KEY st_key(st)) ENGINE=MyISAM;
 
13
insert into t1 values(1, "One");
 
14
alter table t1 disable keys;
 
15
show keys from t1;
 
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
 
22
show keys from t1;
 
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        
 
26
drop table t1;
 
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  status  OK
 
31
create table t1 engine=myisam SELECT 1,"table 1";
 
32
flush tables;
 
33
repair table t1;
 
34
Table   Op      Msg_type        Msg_text
 
35
test.t1 repair  Error   Incorrect file format 't1'
 
36
test.t1 repair  status  OK
 
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
 
41
drop table t1;
 
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;
 
45
REPAIR TABLE t1;
 
46
Table   Op      Msg_type        Msg_text
 
47
test.t1 repair  status  OK
 
48
SHOW INDEX FROM t1;
 
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 GLOBAL myisam_repair_threads=1;
 
52
DROP TABLE t1;
 
53
CREATE TABLE t1(a INT) ENGINE=MyISAM;
 
54
USE mysql;
 
55
REPAIR TABLE test.t1 USE_FRM;
 
56
Table   Op      Msg_type        Msg_text
 
57
test.t1 repair  status  OK
 
58
USE test;
 
59
DROP TABLE t1;
 
60
CREATE TABLE t1(a CHAR(255), KEY(a)) ENGINE=MyISAM;
 
61
SET GLOBAL myisam_sort_buffer_size=4096;
 
62
SHOW VARIABLES LIKE "myisam_sort_buffer_size";
 
63
Variable_name   Value
 
64
myisam_sort_buffer_size 4096
 
65
INSERT INTO t1 VALUES
 
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'),('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');
 
82
ERROR HY000: myisam_sort_buffer_size is too small
 
83
SET GLOBAL myisam_repair_threads=2;
 
84
REPAIR TABLE t1;
 
85
Table   Op      Msg_type        Msg_text
 
86
test.t1 repair  error   myisam_sort_buffer_size is too small
 
87
test.t1 repair  warning Number of rows changed from 0 to 157
 
88
test.t1 repair  status  OK
 
89
SET GLOBAL myisam_repair_threads=1;
 
90
SET GLOBAL myisam_sort_buffer_size=DEFAULT;
 
91
DROP TABLE t1;
 
92
CREATE TABLE t1(a CHAR(255), KEY(a)) ENGINE=MyISAM;
 
93
SET GLOBAL myisam_sort_buffer_size=16384;
 
94
INSERT INTO t1 VALUES
 
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'),('0'),('0'),('0'),
 
110
('0'),('0'),('0'),('0'),('0'),('0'),('0');
 
111
SET GLOBAL myisam_repair_threads=2;
 
112
REPAIR TABLE t1;
 
113
Table   Op      Msg_type        Msg_text
 
114
test.t1 repair  status  OK
 
115
SET GLOBAL myisam_repair_threads=1;
 
116
SET GLOBAL myisam_sort_buffer_size=DEFAULT;
 
117
DROP TABLE t1;
 
118
End of 4.1 tests
 
119
DROP TABLE IF EXISTS tt1;
 
120
CREATE TEMPORARY TABLE tt1 (c1 INT);
 
121
REPAIR TABLE tt1 USE_FRM;
 
122
Table   Op      Msg_type        Msg_text
 
123
tt1     repair  error   Cannot repair temporary table from .frm file
 
124
DROP TABLE tt1;
 
125
SET GLOBAL myisam_sort_buffer_size=DEFAULT;