Debian Codegraph @

mysql-test/suite/storage_engine/repair_table.result

raw
1 DROP TABLE IF EXISTS t1,t2;
2 CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
3 INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
4 CREATE TABLE t2 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
5 REPAIR TABLE t1;
6 Table Op Msg_type Msg_text
7 test.t1 repair status OK
8 INSERT INTO t1 (a,b) VALUES (3,'c');
9 INSERT INTO t2 (a,b) VALUES (4,'d');
10 REPAIR NO_WRITE_TO_BINLOG TABLE t1, t2;
11 Table Op Msg_type Msg_text
12 test.t1 repair status OK
13 test.t2 repair status OK
14 INSERT INTO t2 (a,b) VALUES (5,'e'),(6,'f');
15 REPAIR LOCAL TABLE t2;
16 Table Op Msg_type Msg_text
17 test.t2 repair status OK
18 INSERT INTO t1 (a,b) VALUES (7,'g'),(8,'h');
19 INSERT INTO t2 (a,b) VALUES (9,'i');
20 REPAIR LOCAL TABLE t2, t1 EXTENDED;
21 Table Op Msg_type Msg_text
22 test.t2 repair status OK
23 test.t1 repair status OK
24 INSERT INTO t1 (a,b) VALUES (10,'j');
25 INSERT INTO t2 (a,b) VALUES (11,'k');
26 REPAIR TABLE t1, t2 QUICK USE_FRM;
27 Table Op Msg_type Msg_text
28 test.t1 repair warning Number of rows changed from 0 to 6
29 test.t1 repair status OK
30 test.t2 repair warning Number of rows changed from 0 to 5
31 test.t2 repair status OK
32 INSERT INTO t1 (a,b) VALUES (12,'l');
33 INSERT INTO t2 (a,b) VALUES (13,'m');
34 REPAIR NO_WRITE_TO_BINLOG TABLE t1, t2 QUICK EXTENDED USE_FRM;
35 Table Op Msg_type Msg_text
36 test.t1 repair warning Number of rows changed from 0 to 7
37 test.t1 repair status OK
38 test.t2 repair warning Number of rows changed from 0 to 6
39 test.t2 repair status OK
40 FLUSH TABLE t1;
41 INSERT INTO t1 (a,b) VALUES (14,'n');
42 ERROR HY000: Incorrect file format 't1'
43 # Statement ended with one of expected results (0,130,ER_FAILED_READ_FROM_PAR_FILE,ER_OPEN_AS_READONLY).
44 # If you got a difference in error message, just add it to rdiff file
45 CHECK TABLE t1;
46 Table Op Msg_type Msg_text
47 test.t1 check Error Incorrect file format 't1'
48 test.t1 check error Corrupt
49 SELECT a,b FROM t1;
50 ERROR HY000: Incorrect file format 't1'
51 # Statement ended with one of expected results (0,130,ER_FAILED_READ_FROM_PAR_FILE,ER_OPEN_AS_READONLY).
52 # If you got a difference in error message, just add it to rdiff file
53 REPAIR TABLE t1;
54 Table Op Msg_type Msg_text
55 test.t1 repair Error Incorrect file format 't1'
56 test.t1 repair error Corrupt
57 DROP TABLE t1, t2;
58 call mtr.add_suppression("Got an error from thread_id=.*");
59 call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table");
60 call mtr.add_suppression(" '\..test.t1'");
61 call mtr.add_suppression("Couldn't repair table: test.t1");
62 call mtr.add_suppression("Table 't1' is marked as crashed.*");
63 CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, <CUSTOM_INDEX> (a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
64 REPAIR TABLE t1;
65 Table Op Msg_type Msg_text
66 test.t1 repair status OK
67 INSERT INTO t1 (a,b) VALUES (7,'g'),(8,'h');
68 REPAIR TABLE t1 EXTENDED;
69 Table Op Msg_type Msg_text
70 test.t1 repair status OK
71 INSERT INTO t1 (a,b) VALUES (10,'j');
72 REPAIR TABLE t1 USE_FRM;
73 Table Op Msg_type Msg_text
74 test.t1 repair warning Number of rows changed from 0 to 3
75 test.t1 repair status OK
76 db.opt
77 t1.MYD
78 t1.MYI
79 t1.frm
80 INSERT INTO t1 (a,b) VALUES (14,'n'),(15,'o');
81 # Statement ended with one of expected results (0,144).
82 # If you got a difference in error message, just add it to rdiff file
83 FLUSH TABLE t1;
84 Restoring <DATADIR>/test/t1.MYD
85 CHECK TABLE t1;
86 Table Op Msg_type Msg_text
87 test.t1 check error Size of datafile is: 39 Should be: 65
88 test.t1 check error Corrupt
89 SELECT a,b FROM t1;
90 ERROR HY000: Index for table 't1' is corrupt; try to repair it
91 # Statement ended with one of expected results (0,ER_NOT_KEYFILE,144).
92 # If you got a difference in error message, just add it to rdiff file
93 INSERT INTO t1 (a,b) VALUES (14,'n'),(15,'o');
94 ERROR HY000: Table './test/t1' is marked as crashed and last (automatic?) repair failed
95 # Statement ended with one of expected results (0,144).
96 # If you got a difference in error message, just add it to rdiff file
97 FLUSH TABLE t1;
98 Restoring <DATADIR>/test/t1.MYI
99 CHECK TABLE t1;
100 Table Op Msg_type Msg_text
101 test.t1 check warning Table is marked as crashed and last repair failed
102 test.t1 check error Size of datafile is: 39 Should be: 65
103 test.t1 check error Corrupt
104 SELECT a,b FROM t1;
105 ERROR HY000: Table './test/t1' is marked as crashed and last (automatic?) repair failed
106 # Statement ended with one of expected results (0,ER_NOT_KEYFILE,144).
107 # If you got a difference in error message, just add it to rdiff file
108 DROP TABLE t1;