summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-03-11 22:50:24 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-03-11 22:50:24 +0400
commitea52ecbc103b1424cf0b6f8faf990676b2b57a63 (patch)
tree29e968dbb2f0391fe397a89217513559165bfec0 /mysql-test
parent2a2ab121b0f65cdc4b104ec763d23f1b7035a644 (diff)
parent149b75476837fb96c28739d5368e977e39fd671b (diff)
downloadmariadb-git-ea52ecbc103b1424cf0b6f8faf990676b2b57a63.tar.gz
Merge remote-tracking branch 'origin/10.0' into 10.1
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/innodb/r/foreign-keys.result13
-rw-r--r--mysql-test/suite/innodb/t/foreign-keys.test15
2 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result
index 66fc00e34d0..68528521fb6 100644
--- a/mysql-test/suite/innodb/r/foreign-keys.result
+++ b/mysql-test/suite/innodb/r/foreign-keys.result
@@ -87,3 +87,16 @@ drop table t3;
drop table t2;
drop table t1;
set debug_sync='reset';
+#
+# MDEV-17595 - Server crashes in copy_data_between_tables or
+# Assertion `thd->transaction.stmt.is_empty() ||
+# (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)'
+# fails in close_tables_for_reopen upon concurrent
+# ALTER TABLE and FLUSH
+#
+CREATE TABLE t1 (a INT, KEY(a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1),(2);
+CREATE TABLE t2 (b INT, KEY(b)) ENGINE=InnoDB;
+INSERT INTO t2 VALUES(2);
+ALTER TABLE t2 ADD FOREIGN KEY(b) REFERENCES t1(a), LOCK=EXCLUSIVE;
+DROP TABLE t2, t1;
diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test
index 7ef440b260b..ced44a89d7c 100644
--- a/mysql-test/suite/innodb/t/foreign-keys.test
+++ b/mysql-test/suite/innodb/t/foreign-keys.test
@@ -111,3 +111,18 @@ drop table t3;
drop table t2;
drop table t1;
set debug_sync='reset';
+
+
+--echo #
+--echo # MDEV-17595 - Server crashes in copy_data_between_tables or
+--echo # Assertion `thd->transaction.stmt.is_empty() ||
+--echo # (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)'
+--echo # fails in close_tables_for_reopen upon concurrent
+--echo # ALTER TABLE and FLUSH
+--echo #
+CREATE TABLE t1 (a INT, KEY(a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1),(2);
+CREATE TABLE t2 (b INT, KEY(b)) ENGINE=InnoDB;
+INSERT INTO t2 VALUES(2);
+ALTER TABLE t2 ADD FOREIGN KEY(b) REFERENCES t1(a), LOCK=EXCLUSIVE;
+DROP TABLE t2, t1;