diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-21 09:01:01 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-21 09:01:01 +0300 |
commit | 80ed136e6dd4a021b1fc9b7bd7077bf989c3d247 (patch) | |
tree | cc24f0e4e9241920329865a1b66c1d086aaeaa9a /mysql-test/suite/versioning | |
parent | 675c22c065110be03a5fab82442d2c3dc32aefff (diff) | |
parent | a0588d54a20488b17a178244989e1abc5151a88a (diff) | |
download | mariadb-git-80ed136e6dd4a021b1fc9b7bd7077bf989c3d247.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'mysql-test/suite/versioning')
-rw-r--r-- | mysql-test/suite/versioning/r/alter.result | 17 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/alter.test | 23 |
2 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result index d0aa49f2fde..e07f1408ab7 100644 --- a/mysql-test/suite/versioning/r/alter.result +++ b/mysql-test/suite/versioning/r/alter.result @@ -746,6 +746,23 @@ alter table t1 add column y timestamp(6) as row start; ERROR HY000: Table `t1` is not system-versioned drop table t1; # +# MDEV-25327 Unexpected ER_DUP_ENTRY upon dropping PK column from system-versioned table +# +create table t1 (pk int, a int, primary key (pk), key (a)) +with system versioning; +insert into t1 values (1, 1), (2, 2); +delete from t1; +set system_versioning_alter_history= keep; +alter table t1 drop pk; +drop table t1; +create table t1 (pk int, a int, primary key (pk), key (a)) +with system versioning; +insert into t1 values (1, 2), (2, 8), (3, 4), (4, 4), (5, 0); +delete from t1; +set system_versioning_alter_history= keep; +alter ignore table t1 drop pk; +drop table t1; +# # MDEV-21941 RENAME doesn't work for system time or period fields # create or replace table t1 (a int) with system versioning; diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test index 786627da35e..9d3101fb4ad 100644 --- a/mysql-test/suite/versioning/t/alter.test +++ b/mysql-test/suite/versioning/t/alter.test @@ -632,6 +632,29 @@ alter table t1 add column y timestamp(6) as row start; # cleanup drop table t1; + +--echo # +--echo # MDEV-25327 Unexpected ER_DUP_ENTRY upon dropping PK column from system-versioned table +--echo # +create table t1 (pk int, a int, primary key (pk), key (a)) +with system versioning; +insert into t1 values (1, 1), (2, 2); +delete from t1; +set system_versioning_alter_history= keep; +alter table t1 drop pk; +# cleanup +drop table t1; + +create table t1 (pk int, a int, primary key (pk), key (a)) +with system versioning; +insert into t1 values (1, 2), (2, 8), (3, 4), (4, 4), (5, 0); +delete from t1; +set system_versioning_alter_history= keep; +alter ignore table t1 drop pk; +# cleanup +drop table t1; + + --echo # --echo # MDEV-21941 RENAME doesn't work for system time or period fields --echo # |