mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge branch '10.1' into 10.2
This commit is contained in:
@ -78,3 +78,16 @@ a
|
||||
1
|
||||
2
|
||||
DROP TABLE t1;
|
||||
call mtr.add_suppression('InnoDB: in RENAME TABLE table `test`.`t3`');
|
||||
SET FOREIGN_KEY_CHECKS= OFF;
|
||||
CREATE TABLE t1 (f2 INT, f4 INT, KEY(f2), FOREIGN KEY (f4) REFERENCES t3 (f4)) ENGINE=InnoDB;
|
||||
SET FOREIGN_KEY_CHECKS= ON;
|
||||
CREATE TABLE t2 (f2 INT, FOREIGN KEY(f2) REFERENCES t1 (f2)) ENGINE=InnoDB;
|
||||
CREATE TABLE t3 (a INT) ENGINE=InnoDB;
|
||||
ERROR HY000: Can't create table `test`.`t3` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ALTER TABLE t1 RENAME TO t3;
|
||||
ERROR HY000: Error on rename of './test/t1' to './test/t3' (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ALTER TABLE t1 FORCE;
|
||||
TRUNCATE TABLE t1;
|
||||
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `test`.`t3` (`f2`))
|
||||
DROP TABLE t2, t1;
|
||||
|
Reference in New Issue
Block a user