diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-14 10:33:59 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-14 10:33:59 +0300 |
commit | 5008171b05e0d3b8b5f4af312b94a312281e77c7 (patch) | |
tree | 4a551df68976e937d18a7416d799c7a5605cb12f /mysql-test/suite/versioning/r/alter.result | |
parent | 61f84bba603aa85957b48d151f9ddf5ba4e71ab1 (diff) | |
parent | 13d0641710802bd57b0c0d88c9fc321932014994 (diff) | |
download | mariadb-git-5008171b05e0d3b8b5f4af312b94a312281e77c7.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/suite/versioning/r/alter.result')
-rw-r--r-- | mysql-test/suite/versioning/r/alter.result | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result index 33c1d499088..e0cd63c4d56 100644 --- a/mysql-test/suite/versioning/r/alter.result +++ b/mysql-test/suite/versioning/r/alter.result @@ -80,7 +80,7 @@ t CREATE TABLE `t` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t add column trx_start timestamp(6) as row start; -ERROR HY000: Duplicate ROW START column `trx_start` +ERROR HY000: Table `t` is not system-versioned alter table t add system versioning; show create table t; Table Create Table @@ -696,3 +696,52 @@ delete from t1; set statement system_versioning_alter_history=keep for alter table t1 drop system versioning, modify column a tinyint; drop table t1; +# +# MDEV-24690 Dropping primary key column from versioned table always fails with 1072 +# +create table t1 (a int, b int primary key) with system versioning; +alter table t1 drop column b; +create or replace table t1 ( +a int, b int primary key, +row_start timestamp(6) as row start, +row_end timestamp(6) as row end, +period for system_time(row_start, row_end) +) with system versioning; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) NOT NULL, + `row_start` timestamp(6) GENERATED ALWAYS AS ROW START, + `row_end` timestamp(6) GENERATED ALWAYS AS ROW END, + PRIMARY KEY (`b`,`row_end`), + PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING +alter table t1 drop column b; +ERROR 42000: Key column 'b' doesn't exist in table +create or replace table t1 ( +a int, b int primary key, +row_start timestamp(6) as row start invisible, +row_end timestamp(6) as row end invisible, +period for system_time(row_start, row_end) +) with system versioning; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) NOT NULL, + `row_start` timestamp(6) GENERATED ALWAYS AS ROW START INVISIBLE, + `row_end` timestamp(6) GENERATED ALWAYS AS ROW END INVISIBLE, + PRIMARY KEY (`b`,`row_end`), + PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING +alter table t1 drop column b; +ERROR 42000: Key column 'b' doesn't exist in table +drop table t1; +# +# MDEV-25172 Wrong error message for ADD COLUMN .. AS ROW START +# +create or replace table t1 (x int); +alter table t1 add column y timestamp(6) as row start; +ERROR HY000: Table `t1` is not system-versioned +drop table t1; |