| 1 |
--- optimize_table.result |
| 2 |
+++ optimize_table.reject |
| 3 |
@@ -1,54 +1,62 @@ |
| 4 |
DROP TABLE IF EXISTS t1,t2; |
| 5 |
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2; |
| 6 |
-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'),(2,'d'),(4,'e'),(100,'f'),(101,'g'); |
| 7 |
-CREATE TABLE t2 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY RANGE(a) ( |
| 8 |
-PARTITION p0 VALUES LESS THAN (100), |
| 9 |
-PARTITION p1 VALUES LESS THAN MAXVALUE |
| 10 |
-); |
| 11 |
-INSERT INTO t2 (a,b) SELECT a, b FROM t1; |
| 12 |
-INSERT INTO t1 (a,b) VALUES (3,'c'),(4,'d'); |
| 13 |
-ALTER TABLE t1 OPTIMIZE PARTITION p1; |
| 14 |
-Table Op Msg_type Msg_text |
| 15 |
-test.t1 optimize status OK |
| 16 |
-INSERT INTO t2 (a,b) VALUES (4,'d'); |
| 17 |
-ALTER TABLE t2 OPTIMIZE PARTITION p0 NO_WRITE_TO_BINLOG; |
| 18 |
-Table Op Msg_type Msg_text |
| 19 |
-test.t2 optimize status OK |
| 20 |
-INSERT INTO t1 (a,b) VALUES (6,'f'); |
| 21 |
-ALTER TABLE t1 OPTIMIZE PARTITION ALL LOCAL; |
| 22 |
-Table Op Msg_type Msg_text |
| 23 |
-test.t1 optimize status OK |
| 24 |
-INSERT INTO t2 (a,b) VALUES (5,'e'); |
| 25 |
-ALTER TABLE t2 OPTIMIZE PARTITION p1,p0; |
| 26 |
-Table Op Msg_type Msg_text |
| 27 |
-test.t2 optimize status OK |
| 28 |
-DROP TABLE t1, t2; |
| 29 |
+ERROR HY000: Engine cannot be used in partitioned tables |
| 30 |
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed) |
| 31 |
+# ------------ UNEXPECTED RESULT ------------ |
| 32 |
+# [ 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 ] |
| 33 |
+# The statement|command finished with ER_PARTITION_MERGE_ERROR. |
| 34 |
+# Partitions or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. |
| 35 |
+# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. |
| 36 |
+# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. |
| 37 |
+# Also, this problem may cause a chain effect (more errors of different kinds in the test). |
| 38 |
+# ------------------------------------------- |
| 39 |
DROP TABLE IF EXISTS t1,t2; |
| 40 |
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2; |
| 41 |
+ERROR HY000: Engine cannot be used in partitioned tables |
| 42 |
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed) |
| 43 |
INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); |
| 44 |
+ERROR 42S02: Table 'test.t1' doesn't exist |
| 45 |
CREATE TABLE t2 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2; |
| 46 |
+ERROR HY000: Engine cannot be used in partitioned tables |
| 47 |
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed) |
| 48 |
INSERT INTO t1 (a,b) VALUES (3,'c'),(4,'d'); |
| 49 |
+ERROR 42S02: Table 'test.t1' doesn't exist |
| 50 |
OPTIMIZE TABLE t1; |
| 51 |
Table Op Msg_type Msg_text |
| 52 |
-test.t1 optimize status OK |
| 53 |
+test.t1 optimize Error Table 'test.t1' doesn't exist |
| 54 |
+test.t1 optimize status Operation failed |
| 55 |
INSERT INTO t2 (a,b) VALUES (4,'d'); |
| 56 |
+ERROR 42S02: Table 'test.t2' doesn't exist |
| 57 |
OPTIMIZE NO_WRITE_TO_BINLOG TABLE t2; |
| 58 |
Table Op Msg_type Msg_text |
| 59 |
-test.t2 optimize status OK |
| 60 |
+test.t2 optimize Error Table 'test.t2' doesn't exist |
| 61 |
+test.t2 optimize status Operation failed |
| 62 |
INSERT INTO t2 (a,b) VALUES (5,'e'); |
| 63 |
+ERROR 42S02: Table 'test.t2' doesn't exist |
| 64 |
INSERT INTO t1 (a,b) VALUES (6,'f'); |
| 65 |
+ERROR 42S02: Table 'test.t1' doesn't exist |
| 66 |
OPTIMIZE LOCAL TABLE t1, t2; |
| 67 |
Table Op Msg_type Msg_text |
| 68 |
-test.t1 optimize status OK |
| 69 |
-test.t2 optimize status OK |
| 70 |
+test.t1 optimize Error Table 'test.t1' doesn't exist |
| 71 |
+test.t1 optimize status Operation failed |
| 72 |
+test.t2 optimize Error Table 'test.t2' doesn't exist |
| 73 |
+test.t2 optimize status Operation failed |
| 74 |
OPTIMIZE TABLE t1, t2; |
| 75 |
Table Op Msg_type Msg_text |
| 76 |
-test.t1 optimize status OK |
| 77 |
-test.t2 optimize status OK |
| 78 |
+test.t1 optimize Error Table 'test.t1' doesn't exist |
| 79 |
+test.t1 optimize status Operation failed |
| 80 |
+test.t2 optimize Error Table 'test.t2' doesn't exist |
| 81 |
+test.t2 optimize status Operation failed |
| 82 |
DROP TABLE t1, t2; |
| 83 |
+ERROR 42S02: Unknown table 'test.t1,test.t2' |
| 84 |
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, <CUSTOM_INDEX> (a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> PARTITION BY HASH(a) PARTITIONS 2; |
| 85 |
+ERROR HY000: Engine cannot be used in partitioned tables |
| 86 |
+# ERROR: Statement ended with errno 1572, errname ER_PARTITION_MERGE_ERROR (expected to succeed) |
| 87 |
INSERT INTO t1 (a,b) VALUES (1,'a'),(100,'b'),(2,'c'),(3,'d'); |
| 88 |
+ERROR 42S02: Table 'test.t1' doesn't exist |
| 89 |
OPTIMIZE TABLE t1; |
| 90 |
Table Op Msg_type Msg_text |
| 91 |
-test.t1 optimize status OK |
| 92 |
+test.t1 optimize Error Table 'test.t1' doesn't exist |
| 93 |
+test.t1 optimize status Operation failed |
| 94 |
DROP TABLE t1; |
| 95 |
+ERROR 42S02: Unknown table 'test.t1' |