summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-12 11:42:48 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-12 11:42:48 +0300
commitebddd8699c02519f99a313182b96ae1c04a67a63 (patch)
tree81093f8adffe98889c8c720498a4e9c7f2a6e4ea /mysql-test
parent9bacc9d0c1957650374951637dcfd42cd09c5f5f (diff)
downloadmariadb-git-ebddd8699c02519f99a313182b96ae1c04a67a63.tar.gz
MDEV-20565 Assertion failure on CHANGE COLUMN...SYSTEM VERSIONING
innobase_rename_or_enlarge_column_try(): Relax a debug assertion. The DATA_VERSIONED bits in dict_col_t::prtype do not affect the storage format.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_bugs.result14
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_bugs.test16
2 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/instant_alter_bugs.result b/mysql-test/suite/innodb/r/instant_alter_bugs.result
index 109cbffe871..045b7468049 100644
--- a/mysql-test/suite/innodb/r/instant_alter_bugs.result
+++ b/mysql-test/suite/innodb/r/instant_alter_bugs.result
@@ -269,3 +269,17 @@ ALTER TABLE t1 ADD COLUMN (b INT, c INT, d INT, e INT NOT NULL DEFAULT 0);
ALTER TABLE t1 ADD UNIQUE INDEX(e);
ALTER TABLE t1 DROP b, DROP c, DROP d, DROP e;
DROP TABLE t1;
+#
+# MDEV-20565 Assertion on CHANGE COLUMN...SYSTEM VERSIONING
+#
+set @@system_versioning_alter_history = keep;
+CREATE TABLE t (a INT WITHOUT SYSTEM VERSIONING, b INT) ENGINE=InnoDB
+WITH SYSTEM VERSIONING;
+ALTER TABLE t CHANGE COLUMN a alpha INT WITH SYSTEM VERSIONING,
+ALGORITHM=INSTANT;
+DROP TABLE t;
+CREATE TABLE t (alpha INT, b INT) ENGINE=InnoDB WITH SYSTEM VERSIONING;
+ALTER TABLE t CHANGE COLUMN alpha a INT WITHOUT SYSTEM VERSIONING,
+ALGORITHM=INSTANT;
+DROP TABLE t;
+set @@system_versioning_alter_history = error;
diff --git a/mysql-test/suite/innodb/t/instant_alter_bugs.test b/mysql-test/suite/innodb/t/instant_alter_bugs.test
index fc5e3ca56e4..fda8e88d70c 100644
--- a/mysql-test/suite/innodb/t/instant_alter_bugs.test
+++ b/mysql-test/suite/innodb/t/instant_alter_bugs.test
@@ -277,3 +277,19 @@ ALTER TABLE t1 ADD COLUMN (b INT, c INT, d INT, e INT NOT NULL DEFAULT 0);
ALTER TABLE t1 ADD UNIQUE INDEX(e);
ALTER TABLE t1 DROP b, DROP c, DROP d, DROP e;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20565 Assertion on CHANGE COLUMN...SYSTEM VERSIONING
+--echo #
+set @@system_versioning_alter_history = keep;
+CREATE TABLE t (a INT WITHOUT SYSTEM VERSIONING, b INT) ENGINE=InnoDB
+WITH SYSTEM VERSIONING;
+ALTER TABLE t CHANGE COLUMN a alpha INT WITH SYSTEM VERSIONING,
+ALGORITHM=INSTANT;
+DROP TABLE t;
+
+CREATE TABLE t (alpha INT, b INT) ENGINE=InnoDB WITH SYSTEM VERSIONING;
+ALTER TABLE t CHANGE COLUMN alpha a INT WITHOUT SYSTEM VERSIONING,
+ALGORITHM=INSTANT;
+DROP TABLE t;
+set @@system_versioning_alter_history = error;