summaryrefslogtreecommitdiffstats
path: root/storage/myisammrg/mysql-test/storage_engine/parts/repair_table.rdiff
blob: eddb6872ec3edb1f83008d383a71b2613295b4e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
--- suite/storage_engine/parts/repair_table.result	2017-08-28 19:29:20.491633306 +0300
+++ suite/storage_engine/parts/repair_table.reject	2017-08-28 19:34:41.723633059 +0300
@@ -1,232 +1,116 @@
 call mtr.add_suppression("Table '.*t1.*' is marked as crashed and should be repaired");
 DROP TABLE IF EXISTS t1, t2;
 CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2;
-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'),(2,'d'),(4,'e'),(100,'f'),(101,'g');
-CREATE TABLE t2 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY RANGE(a) (
-PARTITION p0 VALUES LESS THAN (100),
-PARTITION p1 VALUES LESS THAN MAXVALUE
-);
-INSERT INTO t2 (a,b) SELECT a, b FROM t1;
-ALTER TABLE t1 REPAIR PARTITION p0;
-Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
-INSERT INTO t1 (a,b) VALUES (3,'c');
-ALTER TABLE t1 REPAIR PARTITION NO_WRITE_TO_BINLOG p0, p1;
-Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
-INSERT INTO t2 (a,b) VALUES (5,'e'),(6,'f');
-ALTER TABLE t2 REPAIR PARTITION LOCAL p1;
-Table	Op	Msg_type	Msg_text
-test.t2	repair	status	OK
-INSERT INTO t1 (a,b) VALUES (7,'g'),(8,'h');
-ALTER TABLE t1 REPAIR PARTITION LOCAL ALL EXTENDED;
-Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
-INSERT INTO t1 (a,b) VALUES (10,'j');
-ALTER TABLE t1 REPAIR PARTITION p1 QUICK USE_FRM;
-Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
-INSERT INTO t2 (a,b) VALUES (12,'l');
-ALTER TABLE t2 REPAIR PARTITION NO_WRITE_TO_BINLOG ALL QUICK EXTENDED USE_FRM;
-Table	Op	Msg_type	Msg_text
-test.t2	repair	status	OK
-DROP TABLE t1, t2;
+ERROR HY000: Engine cannot be used in partitioned tables
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed)
+# ------------ UNEXPECTED RESULT ------------
+# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b CHAR(8) /*!*/ /*Custom column options*/) ENGINE=MRG_MYISAM /*!*/ /*Custom table options*/ UNION(mrg.t1) INSERT_METHOD=LAST PARTITION BY HASH(a) PARTITIONS 2 ]
+# The statement|command finished with ER_PARTITION_MERGE_ERROR.
+# Partitions or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. 
+# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def.
+# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped.
+# Also, this problem may cause a chain effect (more errors of different kinds in the test).
+# -------------------------------------------
 DROP TABLE IF EXISTS t1,t2;
 CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2;
+ERROR HY000: Engine cannot be used in partitioned tables
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed)
 INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
+ERROR 42S02: Table 'test.t1' doesn't exist
 CREATE TABLE t2 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2;
+ERROR HY000: Engine cannot be used in partitioned tables
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed)
 REPAIR TABLE t1;
 Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
+test.t1	repair	Error	Table 'test.t1' doesn't exist
+test.t1	repair	status	Operation failed
 INSERT INTO t1 (a,b) VALUES (3,'c');
+ERROR 42S02: Table 'test.t1' doesn't exist
 INSERT INTO t2 (a,b) VALUES (4,'d');
+ERROR 42S02: Table 'test.t2' doesn't exist
 REPAIR NO_WRITE_TO_BINLOG TABLE t1, t2;
 Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
-test.t2	repair	status	OK
+test.t1	repair	Error	Table 'test.t1' doesn't exist
+test.t1	repair	status	Operation failed
+test.t2	repair	Error	Table 'test.t2' doesn't exist
+test.t2	repair	status	Operation failed
 INSERT INTO t2 (a,b) VALUES (5,'e'),(6,'f');
+ERROR 42S02: Table 'test.t2' doesn't exist
 REPAIR LOCAL TABLE t2;
 Table	Op	Msg_type	Msg_text
-test.t2	repair	status	OK
+test.t2	repair	Error	Table 'test.t2' doesn't exist
+test.t2	repair	status	Operation failed
 INSERT INTO t1 (a,b) VALUES (7,'g'),(8,'h');
+ERROR 42S02: Table 'test.t1' doesn't exist
 INSERT INTO t2 (a,b) VALUES (9,'i');
+ERROR 42S02: Table 'test.t2' doesn't exist
 REPAIR LOCAL TABLE t2, t1 EXTENDED;
 Table	Op	Msg_type	Msg_text
-test.t2	repair	status	OK
-test.t1	repair	status	OK
+test.t2	repair	Error	Table 'test.t2' doesn't exist
+test.t2	repair	status	Operation failed
+test.t1	repair	Error	Table 'test.t1' doesn't exist
+test.t1	repair	status	Operation failed
 INSERT INTO t1 (a,b) VALUES (10,'j');
+ERROR 42S02: Table 'test.t1' doesn't exist
 INSERT INTO t2 (a,b) VALUES (11,'k');
+ERROR 42S02: Table 'test.t2' doesn't exist
 REPAIR TABLE t1, t2 QUICK USE_FRM;
 Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
-test.t2	repair	status	OK
+test.t1	repair	Error	Table 'test.t1' doesn't exist
+test.t1	repair	status	Operation failed
+test.t2	repair	Error	Table 'test.t2' doesn't exist
+test.t2	repair	status	Operation failed
 INSERT INTO t1 (a,b) VALUES (12,'l');
+ERROR 42S02: Table 'test.t1' doesn't exist
 INSERT INTO t2 (a,b) VALUES (13,'m');
+ERROR 42S02: Table 'test.t2' doesn't exist
 REPAIR NO_WRITE_TO_BINLOG TABLE t1, t2 QUICK EXTENDED USE_FRM;
 Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
-test.t2	repair	status	OK
+test.t1	repair	Error	Table 'test.t1' doesn't exist
+test.t1	repair	status	Operation failed
+test.t2	repair	Error	Table 'test.t2' doesn't exist
+test.t2	repair	status	Operation failed
 FLUSH TABLE t1;
 INSERT INTO t1 (a,b) VALUES (14,'n');
-ERROR HY000: Failed to read from the .par file
-# Statement ended with one of expected results (0,130,ER_FAILED_READ_FROM_PAR_FILE,ER_OPEN_AS_READONLY). 
-# If you got a difference in error message, just add it to rdiff file
+ERROR 42S02: Table 'test.t1' doesn't exist
+# ERROR: Statement ended with errno 1146, errname ER_NO_SUCH_TABLE (expected results: 0,130,ER_FAILED_READ_FROM_PAR_FILE,ER_OPEN_AS_READONLY)
 CHECK TABLE t1;
 Table	Op	Msg_type	Msg_text
-test.t1	check	Error	Failed to read from the .par file
-test.t1	check	error	Corrupt
+test.t1	check	Error	Table 'test.t1' doesn't exist
+test.t1	check	status	Operation failed
 SELECT a,b FROM t1;
-ERROR HY000: Failed to read from the .par file
-# Statement ended with one of expected results (0,130,ER_FAILED_READ_FROM_PAR_FILE,ER_OPEN_AS_READONLY). 
-# If you got a difference in error message, just add it to rdiff file
+ERROR 42S02: Table 'test.t1' doesn't exist
+# ERROR: Statement ended with errno 1146, errname ER_NO_SUCH_TABLE (expected results: 0,130,ER_FAILED_READ_FROM_PAR_FILE,ER_OPEN_AS_READONLY)
 REPAIR TABLE t1;
 Table	Op	Msg_type	Msg_text
-test.t1	repair	Error	Failed to read from the .par file
-test.t1	repair	error	Corrupt
+test.t1	repair	Error	Table 'test.t1' doesn't exist
+test.t1	repair	status	Operation failed
 DROP TABLE t1, t2;
+ERROR 42S02: Unknown table 'test.t1,test.t2'
 call mtr.add_suppression("Got an error from thread_id=.*");
 call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table");
 call mtr.add_suppression(" '\..test.t1'");
 call mtr.add_suppression("Couldn't repair table: test.t1");
 call mtr.add_suppression("Table 't1' is marked as crashed.*");
 CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, <CUSTOM_INDEX> (a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2;
+ERROR HY000: Engine cannot be used in partitioned tables
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed)
 REPAIR TABLE t1;
 Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
+test.t1	repair	Error	Table 'test.t1' doesn't exist
+test.t1	repair	status	Operation failed
 INSERT INTO t1 (a,b) VALUES (7,'g'),(8,'h');
+ERROR 42S02: Table 'test.t1' doesn't exist
 REPAIR TABLE t1 EXTENDED;
 Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
+test.t1	repair	Error	Table 'test.t1' doesn't exist
+test.t1	repair	status	Operation failed
 INSERT INTO t1 (a,b) VALUES (10,'j');
+ERROR 42S02: Table 'test.t1' doesn't exist
 REPAIR TABLE t1 USE_FRM;
 Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
+test.t1	repair	Error	Table 'test.t1' doesn't exist
+test.t1	repair	status	Operation failed
 db.opt
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1.frm
-t1.par
-INSERT INTO t1 (a,b) VALUES (14,'n'),(15,'o');
-# Statement ended with one of expected results (0,144). 
-# If you got a difference in error message, just add it to rdiff file
-FLUSH TABLE t1;
-Restoring <DATADIR>/test/t1#P#p0.MYD
-CHECK TABLE t1;
-Table	Op	Msg_type	Msg_text
-test.t1	check	error	Size of datafile is: 26         Should be: 39
-test.t1	check	error	Partition p0 returned error
-test.t1	check	error	Corrupt
-SELECT a,b FROM t1;
-a	b
-8	h
-10	j
-7	g
-15	o
-Warnings:
-Error	145	Table './test/t1#P#p0' is marked as crashed and should be repaired
-Error	1034	Number of rows changed from 3 to 2
-# Statement ended with one of expected results (0,ER_NOT_KEYFILE,144). 
-# If you got a difference in error message, just add it to rdiff file
-INSERT INTO t1 (a,b) VALUES (14,'n'),(15,'o');
-# Statement ended with one of expected results (0,144). 
-# If you got a difference in error message, just add it to rdiff file
-FLUSH TABLE t1;
-Restoring <DATADIR>/test/t1#P#p0.MYI
-CHECK TABLE t1;
-Table	Op	Msg_type	Msg_text
-test.t1	check	warning	Size of datafile is: 39       Should be: 26
-test.t1	check	error	Record-count is not ok; is 3   Should be: 2
-test.t1	check	warning	Found 3 key parts. Should be: 2
-test.t1	check	error	Partition p0 returned error
-test.t1	check	error	Corrupt
-SELECT a,b FROM t1;
-a	b
-8	h
-10	j
-14	n
-7	g
-15	o
-15	o
-Warnings:
-Error	145	Table './test/t1#P#p0' is marked as crashed and should be repaired
-Error	1034	Number of rows changed from 2 to 3
-# Statement ended with one of expected results (0,ER_NOT_KEYFILE,144). 
-# If you got a difference in error message, just add it to rdiff file
-INSERT INTO t1 (a,b) VALUES (14,'n'),(15,'o');
-# Statement ended with one of expected results (0,144). 
-# If you got a difference in error message, just add it to rdiff file
-FLUSH TABLE t1;
-Restoring <DATADIR>/test/t1#P#p1.MYD
-CHECK TABLE t1;
-Table	Op	Msg_type	Msg_text
-test.t1	check	error	Size of datafile is: 39         Should be: 52
-test.t1	check	error	Partition p1 returned error
-test.t1	check	error	Corrupt
-SELECT a,b FROM t1;
-a	b
-8	h
-10	j
-14	n
-14	n
-7	g
-15	o
-15	o
-Warnings:
-Error	145	Table './test/t1#P#p1' is marked as crashed and should be repaired
-Error	1034	Number of rows changed from 4 to 3
-# Statement ended with one of expected results (0,ER_NOT_KEYFILE,144). 
-# If you got a difference in error message, just add it to rdiff file
-INSERT INTO t1 (a,b) VALUES (14,'n'),(15,'o');
-# Statement ended with one of expected results (0,144). 
-# If you got a difference in error message, just add it to rdiff file
-FLUSH TABLE t1;
-Restoring <DATADIR>/test/t1#P#p1.MYI
-CHECK TABLE t1;
-Table	Op	Msg_type	Msg_text
-test.t1	check	warning	Size of datafile is: 52       Should be: 39
-test.t1	check	error	Record-count is not ok; is 4   Should be: 3
-test.t1	check	warning	Found 4 key parts. Should be: 3
-test.t1	check	error	Partition p1 returned error
-test.t1	check	error	Corrupt
-SELECT a,b FROM t1;
-a	b
-8	h
-10	j
-14	n
-14	n
-14	n
-7	g
-15	o
-15	o
-15	o
-Warnings:
-Error	145	Table './test/t1#P#p1' is marked as crashed and should be repaired
-Error	1034	Number of rows changed from 3 to 4
-# Statement ended with one of expected results (0,ER_NOT_KEYFILE,144). 
-# If you got a difference in error message, just add it to rdiff file
-INSERT INTO t1 (a,b) VALUES (14,'n'),(15,'o');
-# Statement ended with one of expected results (0,144). 
-# If you got a difference in error message, just add it to rdiff file
-FLUSH TABLE t1;
-Restoring <DATADIR>/test/t1.par
-CHECK TABLE t1;
-Table	Op	Msg_type	Msg_text
-test.t1	check	status	OK
-SELECT a,b FROM t1;
-a	b
-8	h
-10	j
-14	n
-14	n
-14	n
-14	n
-7	g
-15	o
-15	o
-15	o
-15	o
-# Statement ended with one of expected results (0,ER_NOT_KEYFILE,144). 
-# If you got a difference in error message, just add it to rdiff file
 DROP TABLE t1;
+ERROR 42S02: Unknown table 'test.t1'