diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2019-04-11 10:04:34 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2019-08-11 12:32:08 +0300 |
commit | 0b74c8832d45340a455f27c3b4aa20db5d8313db (patch) | |
tree | b0d81bb973c5918b3a4ca273e7e07c2a5e02c385 /mysql-test/suite/versioning | |
parent | 638e78853f8d7c0e2c1cf580f3847c5789f165e1 (diff) | |
download | mariadb-git-0b74c8832d45340a455f27c3b4aa20db5d8313db.tar.gz |
MDEV-19127 Assertion `row_start_field' failed in vers_prepare_keys upon ALTER TABLE
Prevent conflicting clauses at parser level.
Clear HA_VERSIONED_TABLE flag for DROP SYSTEM VERSIONING (for the sake
of strictness).
Diffstat (limited to 'mysql-test/suite/versioning')
-rw-r--r-- | mysql-test/suite/versioning/r/alter.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/alter.test | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result index 0c79e6d4a39..2afd3921154 100644 --- a/mysql-test/suite/versioning/r/alter.result +++ b/mysql-test/suite/versioning/r/alter.result @@ -629,5 +629,14 @@ alter table t1 drop column `row_start`, drop column `row_end`, drop system versi ERROR 42000: Can't DROP COLUMN `row_start`; check that it exists alter table t1 drop column `row_end`; ERROR 42000: Can't DROP COLUMN `row_end`; check that it exists +# +# MDEV-19127 Assertion `row_start_field' failed in vers_prepare_keys upon ALTER TABLE +# +set system_versioning_alter_history=keep; +create or replace table t1 (f1 int) with system versioning; +alter table t1 add f2 int with system versioning, drop system versioning; +create or replace table t1 (f1 int) with system versioning; +alter table t1 drop system versioning, add f2 int with system versioning; +ERROR HY000: Table `t1` is not system-versioned drop database test; create database test; diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test index ea699104eac..c04c2020460 100644 --- a/mysql-test/suite/versioning/t/alter.test +++ b/mysql-test/suite/versioning/t/alter.test @@ -528,5 +528,15 @@ alter table t1 drop column `row_start`, drop column `row_end`, drop system versi --error ER_CANT_DROP_FIELD_OR_KEY alter table t1 drop column `row_end`; +--echo # +--echo # MDEV-19127 Assertion `row_start_field' failed in vers_prepare_keys upon ALTER TABLE +--echo # +set system_versioning_alter_history=keep; +create or replace table t1 (f1 int) with system versioning; +alter table t1 add f2 int with system versioning, drop system versioning; +create or replace table t1 (f1 int) with system versioning; +--error ER_VERS_NOT_VERSIONED +alter table t1 drop system versioning, add f2 int with system versioning; + drop database test; create database test; |