summaryrefslogtreecommitdiff
path: root/mysql-test/t/alter_table.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-01-10 14:39:28 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-01-10 14:39:28 +0200
commitf27ca6f667f21b45325cc0f262f6aa632375be9a (patch)
tree124795f9fb62aa21b1d053535ac2d92fa82069b0 /mysql-test/t/alter_table.test
parent3d46768da2a784ddc9c341d1fb03468525bd38f1 (diff)
parent5044dae239d094582879792de7a762d3428223ce (diff)
downloadmariadb-git-f27ca6f667f21b45325cc0f262f6aa632375be9a.tar.gz
Merge 10.1 into 10.2
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r--mysql-test/t/alter_table.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index b48841d9407..5efbd7c8819 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -1735,6 +1735,25 @@ SHOW CREATE TABLE `tab1`;
ALTER TABLE `tab1` CHANGE COLUMN v_col `v_col` varchar(128) AS (IF(field11='option1',CONCAT_WS(":","field1",field2,field3,field4,field5,field6,field7,field8,field9,field10), CONCAT_WS(":","field1",field11,field2,field3,field4,field5,field6,field7,field8,field9,field10))) PERSISTENT;
SHOW CREATE TABLE `tab1`;
DROP TABLE `tab1`;
+
+--echo #
+--echo # MDEV-11548 Reproducible server crash after the 2nd ALTER TABLE ADD FOREIGN KEY IF NOT EXISTS
+--echo #
+
+CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY);
+CREATE TABLE t2 (id1 INT UNSIGNED NOT NULL);
+
+ALTER TABLE t2
+ADD FOREIGN KEY IF NOT EXISTS (id1)
+ REFERENCES t1 (id);
+
+ALTER TABLE t2
+ADD FOREIGN KEY IF NOT EXISTS (id1)
+REFERENCES t1 (id);
+
+DROP TABLE t2;
+DROP TABLE t1;
+
--echo #
--echo # Start of 10.1 tests
--echo #