Commit d17b361e authored by unknown's avatar unknown

Add testcase for bug #12084.

parent 2d1c26cc
......@@ -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;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment