diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-10-13 10:05:29 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-10-13 10:05:29 +0300 |
commit | 588efca2374536aab956e6366f96082f2886c73c (patch) | |
tree | af1b126c795cd1255d7c7d72c201c01339119755 /mysql-test/main/partition_alter.test | |
parent | b6ebadaa66ee68b1880c0e10669543d1ba058c18 (diff) | |
parent | 1feccb505f9ec5cada8f8e2c544f736c1a533633 (diff) | |
download | mariadb-git-588efca2374536aab956e6366f96082f2886c73c.tar.gz |
Merge 10.6 into 10.7
Diffstat (limited to 'mysql-test/main/partition_alter.test')
-rw-r--r-- | mysql-test/main/partition_alter.test | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/mysql-test/main/partition_alter.test b/mysql-test/main/partition_alter.test index 782089087ae..393755c3b50 100644 --- a/mysql-test/main/partition_alter.test +++ b/mysql-test/main/partition_alter.test @@ -185,8 +185,60 @@ 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 + create or replace table t1 (x int primary key) partition by range(x) ( p1 values less than (10), @@ -233,3 +285,5 @@ partition by list(x) ( pn values in (52, 53, 54)); drop table t1; + +--echo # End of 10.7 tests |