Skip to content
Permalink
Browse files

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.
  • Loading branch information...
dr-m committed Sep 12, 2019
1 parent 9bacc9d commit ebddd8699c02519f99a313182b96ae1c04a67a63
@@ -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;
@@ -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;
@@ -9139,7 +9139,7 @@ innobase_rename_or_enlarge_column_try(
case DATA_BLOB:
break;
default:
ut_ad(col->prtype == prtype);
ut_ad(!((col->prtype ^ prtype) & ~DATA_VERSIONED));
ut_ad(col->mtype == mtype);
ut_ad(col->len == len);
}

0 comments on commit ebddd86

Please sign in to comment.
You can’t perform that action at this time.