| 1 |
--- suite/storage_engine/foreign_keys.result |
| 2 |
+++ suite/storage_engine/foreign_keys.reject |
| 3 |
@@ -12,29 +12,57 @@ |
| 4 |
t2 CREATE TABLE `t2` ( |
| 5 |
`a` int(11) DEFAULT NULL, |
| 6 |
`b` char(8) DEFAULT NULL, |
| 7 |
- KEY `a` (`a`), |
| 8 |
- CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`) |
| 9 |
+ KEY `a` (`a`) |
| 10 |
) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 |
| 11 |
INSERT INTO t2 (a,b) VALUES (1,'a'),(2,'b'); |
| 12 |
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)) |
| 13 |
+# ERROR: Statement succeeded (expected results: ER_NO_REFERENCED_ROW_2) |
| 14 |
+# ------------ UNEXPECTED RESULT ------------ |
| 15 |
+# The statement|command succeeded unexpectedly. |
| 16 |
+# Foreign keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. |
| 17 |
+# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. |
| 18 |
+# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. |
| 19 |
+# Also, this problem may cause a chain effect (more errors of different kinds in the test). |
| 20 |
+# ------------------------------------------- |
| 21 |
INSERT INTO t1 (a,b) VALUES (1,'c'),(2,'d'); |
| 22 |
INSERT INTO t2 (a,b) VALUES (1,'a'),(2,'b'); |
| 23 |
UPDATE t2 SET a=a+1; |
| 24 |
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)) |
| 25 |
+# ERROR: Statement succeeded (expected results: ER_NO_REFERENCED_ROW_2) |
| 26 |
+# ------------ UNEXPECTED RESULT ------------ |
| 27 |
+# The statement|command succeeded unexpectedly. |
| 28 |
+# Foreign keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. |
| 29 |
+# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. |
| 30 |
+# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. |
| 31 |
+# Also, this problem may cause a chain effect (more errors of different kinds in the test). |
| 32 |
+# ------------------------------------------- |
| 33 |
UPDATE t1 SET a=3 WHERE a=2; |
| 34 |
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)) |
| 35 |
+# ERROR: Statement succeeded (expected results: ER_ROW_IS_REFERENCED_2) |
| 36 |
DELETE FROM t1 WHERE a=2; |
| 37 |
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)) |
| 38 |
+# ERROR: Statement succeeded (expected results: ER_ROW_IS_REFERENCED_2) |
| 39 |
+# ------------ UNEXPECTED RESULT ------------ |
| 40 |
+# The statement|command succeeded unexpectedly. |
| 41 |
+# Foreign keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. |
| 42 |
+# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. |
| 43 |
+# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. |
| 44 |
+# Also, this problem may cause a chain effect (more errors of different kinds in the test). |
| 45 |
+# ------------------------------------------- |
| 46 |
DELETE FROM t2 WHERE a=2; |
| 47 |
SELECT a,b FROM t1; |
| 48 |
a b |
| 49 |
1 c |
| 50 |
-2 d |
| 51 |
+3 d |
| 52 |
SELECT a,b FROM t2; |
| 53 |
a b |
| 54 |
-1 a |
| 55 |
+3 b |
| 56 |
+3 b |
| 57 |
DROP TABLE t1; |
| 58 |
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails |
| 59 |
+# ERROR: Statement succeeded (expected results: ER_ROW_IS_REFERENCED_2) |
| 60 |
+# ------------ UNEXPECTED RESULT ------------ |
| 61 |
+# The statement|command succeeded unexpectedly. |
| 62 |
+# Foreign keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. |
| 63 |
+# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. |
| 64 |
+# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. |
| 65 |
+# Also, this problem may cause a chain effect (more errors of different kinds in the test). |
| 66 |
+# ------------------------------------------- |
| 67 |
DROP TABLE t2; |
| 68 |
CREATE TABLE t2 (a <INT_COLUMN>, |
| 69 |
b <CHAR_COLUMN>, |
| 70 |
@@ -46,26 +74,65 @@ |
| 71 |
t2 CREATE TABLE `t2` ( |
| 72 |
`a` int(11) DEFAULT NULL, |
| 73 |
`b` char(8) DEFAULT NULL, |
| 74 |
- KEY `a` (`a`), |
| 75 |
- CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`) ON DELETE CASCADE ON UPDATE CASCADE |
| 76 |
+ KEY `a` (`a`) |
| 77 |
) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 |
| 78 |
INSERT INTO t2 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'),(4,'d'); |
| 79 |
-ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`) ON DELETE CASCADE ON UPDATE CASCADE) |
| 80 |
+# ERROR: Statement succeeded (expected results: ER_NO_REFERENCED_ROW_2) |
| 81 |
INSERT INTO t1 (a,b) VALUES (3,'a'),(4,'a'); |
| 82 |
+ERROR 42S02: Table 'test.t1' doesn't exist |
| 83 |
INSERT INTO t2 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'),(4,'d'),(4,'e'),(3,'a'); |
| 84 |
UPDATE t1 SET a=a+1; |
| 85 |
+ERROR 42S02: Table 'test.t1' doesn't exist |
| 86 |
+# ------------ UNEXPECTED RESULT ------------ |
| 87 |
+# The statement|command finished with ER_NO_SUCH_TABLE. |
| 88 |
+# UPDATE or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. |
| 89 |
+# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. |
| 90 |
+# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. |
| 91 |
+# Also, this problem may cause a chain effect (more errors of different kinds in the test). |
| 92 |
+# ------------------------------------------- |
| 93 |
SELECT a,b FROM t2; |
| 94 |
a b |
| 95 |
-5 a |
| 96 |
-5 a |
| 97 |
-5 b |
| 98 |
-5 c |
| 99 |
-5 d |
| 100 |
-5 e |
| 101 |
+1 a |
| 102 |
+1 a |
| 103 |
+2 b |
| 104 |
+2 b |
| 105 |
+3 a |
| 106 |
+3 c |
| 107 |
+3 c |
| 108 |
+4 d |
| 109 |
+4 d |
| 110 |
+4 e |
| 111 |
DELETE FROM t1 WHERE b='a' LIMIT 2; |
| 112 |
+ERROR 42S02: Table 'test.t1' doesn't exist |
| 113 |
+# ------------ UNEXPECTED RESULT ------------ |
| 114 |
+# The statement|command finished with ER_NO_SUCH_TABLE. |
| 115 |
+# DELETE or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. |
| 116 |
+# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. |
| 117 |
+# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. |
| 118 |
+# Also, this problem may cause a chain effect (more errors of different kinds in the test). |
| 119 |
+# ------------------------------------------- |
| 120 |
SELECT a,b FROM t2; |
| 121 |
a b |
| 122 |
+1 a |
| 123 |
+1 a |
| 124 |
+2 b |
| 125 |
+2 b |
| 126 |
+3 a |
| 127 |
+3 c |
| 128 |
+3 c |
| 129 |
+4 d |
| 130 |
+4 d |
| 131 |
+4 e |
| 132 |
TRUNCATE TABLE t1; |
| 133 |
-ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t1` (`a`)) |
| 134 |
+ERROR 42S02: Table 'test.t1' doesn't exist |
| 135 |
+# ERROR: Statement ended with errno 1146, errname ER_NO_SUCH_TABLE (expected results: ER_TRUNCATE_ILLEGAL_FK) |
| 136 |
+# ------------ UNEXPECTED RESULT ------------ |
| 137 |
+# The statement|command finished with ER_NO_SUCH_TABLE. |
| 138 |
+# Foreign keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. |
| 139 |
+# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. |
| 140 |
+# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. |
| 141 |
+# Also, this problem may cause a chain effect (more errors of different kinds in the test). |
| 142 |
+# ------------------------------------------- |
| 143 |
DROP TABLE t2; |
| 144 |
DROP TABLE t1; |
| 145 |
+ERROR 42S02: Unknown table 'test.t1' |