diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-10-12 12:14:13 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-10-12 12:14:13 +0300 |
commit | a992c615a66341ec4c86d0f97fcdb36e3b837a54 (patch) | |
tree | de1e5af122d35443a964c10d68c287022da084f6 /mysql-test/main/partition_alter.test | |
parent | 15edd69ddf649ebf7ecab3fa72bc5dea263c0154 (diff) | |
parent | 977c385df36dcb751720dc838521b7cb5a328cb9 (diff) | |
download | mariadb-git-a992c615a66341ec4c86d0f97fcdb36e3b837a54.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'mysql-test/main/partition_alter.test')
-rw-r--r-- | mysql-test/main/partition_alter.test | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/mysql-test/main/partition_alter.test b/mysql-test/main/partition_alter.test index 804b43dc3c2..45fa8d280fe 100644 --- a/mysql-test/main/partition_alter.test +++ b/mysql-test/main/partition_alter.test @@ -185,4 +185,56 @@ select * from t1 partition(p1); delete from t1; drop table t1; +--echo # +--echo # MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned table +--echo # +create table t (a int, b int) partition by list (b) (partition p1 values in (1, 2)); +insert into t values (0, 1), (2, 2); +alter table t change b f int, change a b int, algorithm=nocopy; +check table t; +delete from t order by b limit 1; +# cleanup +drop table t; + --echo # End of 10.3 tests + +--echo # +--echo # MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned table +--echo # +create table t (a int) +partition by list (a) +subpartition by hash(a) subpartitions 2 +(partition p0 values in (1)); +alter table t rename column a to b, algorithm=nocopy; +show create table t; +alter table t rename column b to c, algorithm=copy; +show create table t; +drop table t; + +create table t (d int, e int) +partition by list columns (d, e) +subpartition by key (d, e) +(partition p0 values in ((2, 3))); +alter table t rename column d to f, rename column e to g, algorithm=nocopy; +show create table t; +alter table t rename column f to h, rename column g to i, algorithm=copy; +show create table t; +drop table t; + +create table t (k int, l int) +partition by range (k) +subpartition by hash(l) subpartitions 4 +(partition p0 values less than (5)); +alter table t rename column k to l, rename column l to k; +show create table t; +drop table t; + +create table t (a int, b int) partition by list (b) (partition p1 values in (1, 2)); +insert into t values (0, 1), (2, 2); +alter table t rename column b to f, rename column a to b, algorithm=nocopy; +check table t; +delete from t order by b limit 1; +# cleanup +drop table t; + +--echo # End of 10.5 tests |