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