mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
Add testcase for bug #12084.
This commit is contained in:
parent
084e37b88c
commit
2c69c199a1
2 changed files with 27 additions and 0 deletions
|
@ -2527,3 +2527,15 @@ SELECT * FROM t1;
|
|||
id
|
||||
1
|
||||
DROP TABLE t2, t1;
|
||||
CREATE TABLE t1
|
||||
(
|
||||
id INT PRIMARY KEY
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TEMPORARY TABLE t2
|
||||
(
|
||||
id INT NOT NULL PRIMARY KEY,
|
||||
b INT,
|
||||
FOREIGN KEY (b) REFERENCES test.t1(id)
|
||||
) ENGINE=InnoDB;
|
||||
Got one of the listed errors
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -1451,3 +1451,18 @@ TRUNCATE t1;
|
|||
INSERT INTO t1 (id) VALUES (NULL);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t2, t1;
|
||||
|
||||
-- Test that foreign keys in temporary tables are not accepted (bug #12084)
|
||||
CREATE TABLE t1
|
||||
(
|
||||
id INT PRIMARY KEY
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--error 1005,1005
|
||||
CREATE TEMPORARY TABLE t2
|
||||
(
|
||||
id INT NOT NULL PRIMARY KEY,
|
||||
b INT,
|
||||
FOREIGN KEY (b) REFERENCES test.t1(id)
|
||||
) ENGINE=InnoDB;
|
||||
DROP TABLE t1;
|
||||
|
|
Loading…
Reference in a new issue