summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r/temporary_table.result
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2018-05-17 22:03:53 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2018-05-17 22:03:53 +0530
commitf38d8c17010642b038cb886bb8a40389c91f996d (patch)
treef924b26e9d32e9d3221be51e94298875f1ad499b /mysql-test/suite/innodb/r/temporary_table.result
parent15425767e8370725e4f80e26da05d93067cf534d (diff)
downloadmariadb-git-f38d8c17010642b038cb886bb8a40389c91f996d.tar.gz
MDEV-16201 CREATE TABLE creates extra transaction
InnoDB does not allow FOREIGN KEY constraints to exist for TEMPORARY TABLE. InnoDB introduced a dedicated tablespace for temporary tables, and actually stopped creating persistent metadata and data for temporary tables. row_table_add_foreign_constraints(): Do not create a persistent transaction. dict_create_foreign_constraints_low(): Add the persistent transaction to the update the foreign key relation in dictionary. dict_create_foreign_constraints_low(): Remove a duplicated check for partitioned tables.
Diffstat (limited to 'mysql-test/suite/innodb/r/temporary_table.result')
-rw-r--r--mysql-test/suite/innodb/r/temporary_table.result8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result
index 64eb3270934..533d32089c3 100644
--- a/mysql-test/suite/innodb/r/temporary_table.result
+++ b/mysql-test/suite/innodb/r/temporary_table.result
@@ -650,3 +650,11 @@ SELECT * FROM t1;
f1
0
DROP TABLE t1;
+#
+# MDEV-15874 CREATE TABLE creates extra transaction
+#
+call mtr.add_suppression("Warning 150 Create table `mysqld.1`.`t1` with foreign key constraint failed. Temporary tables can't have foreign key constraints.*");
+SET FOREIGN_KEY_CHECKS = 0;
+CREATE TEMPORARY TABLE t1(f1 INT NOT NULL,
+FOREIGN KEY(f1) REFERENCES t0(f1))ENGINE=InnoDB;
+ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")