Debian Codegraph @

storage/myisammrg/mysql-test/storage_engine/foreign_keys.rdiff

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