mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-runtime
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug18819
This commit is contained in:
@ -104,3 +104,19 @@ SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` =
|
||||
id1
|
||||
2
|
||||
DROP TABLE t1, t2;
|
||||
DROP TABLE IF EXISTS t2, t1;
|
||||
CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE= InnoDB;
|
||||
CREATE TABLE t2 (
|
||||
i INT NOT NULL,
|
||||
FOREIGN KEY (i) REFERENCES t1 (i) ON DELETE NO ACTION
|
||||
) ENGINE= InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (1);
|
||||
DELETE IGNORE FROM t1 WHERE i = 1;
|
||||
Warnings:
|
||||
Error 1217 Cannot delete or update a parent row: a foreign key constraint fails
|
||||
SELECT * FROM t1, t2;
|
||||
i i
|
||||
1 1
|
||||
DROP TABLE t2, t1;
|
||||
End of 4.1 tests.
|
||||
|
@ -117,3 +117,32 @@ INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES
|
||||
|
||||
SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` = 1 AND `id3` = 2);
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
||||
#
|
||||
# BUG#18819: DELETE IGNORE hangs on foreign key parent delete
|
||||
#
|
||||
# The bug itself does not relate to InnoDB, but we have to use foreign
|
||||
# keys to reproduce it.
|
||||
#
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t2, t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE= InnoDB;
|
||||
CREATE TABLE t2 (
|
||||
i INT NOT NULL,
|
||||
FOREIGN KEY (i) REFERENCES t1 (i) ON DELETE NO ACTION
|
||||
) ENGINE= InnoDB;
|
||||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (1);
|
||||
|
||||
DELETE IGNORE FROM t1 WHERE i = 1;
|
||||
|
||||
SELECT * FROM t1, t2;
|
||||
|
||||
DROP TABLE t2, t1;
|
||||
|
||||
|
||||
--echo End of 4.1 tests.
|
||||
|
Reference in New Issue
Block a user