diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-11-21 10:32:08 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-11-21 10:32:08 +0200 |
commit | bebe193979405b28b15af008621248ed117e54a4 (patch) | |
tree | 4947916c6c2afed02dc14494e8990d293c2c816d /mysql-test/suite/versioning | |
parent | bb894f2376bff6ada36a3f627d4b1bf27ee9ca2a (diff) | |
parent | b35a048ece4f5dd7c6757d86a303f27187a16117 (diff) | |
download | mariadb-git-bebe193979405b28b15af008621248ed117e54a4.tar.gz |
Merge 10.9 into 10.10
Diffstat (limited to 'mysql-test/suite/versioning')
-rw-r--r-- | mysql-test/suite/versioning/r/partition.result | 23 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/partition.test | 22 |
2 files changed, 43 insertions, 2 deletions
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result index e29aafc7c92..4a3f846ae49 100644 --- a/mysql-test/suite/versioning/r/partition.result +++ b/mysql-test/suite/versioning/r/partition.result @@ -96,6 +96,16 @@ with system versioning partition by system_time ( partition p0 history, partition pn current); +create or replace table t1 (a int) +partition by range (a) ( +partition p0 history, +partition p1 current); +ERROR HY000: Wrong partition type `SYSTEM_TIME` for partitioning by `RANGE` +create or replace table t1 (b int) +partition by range (a) ( +partition p0 current, +partition p1 history); +ERROR HY000: Wrong partition type `SYSTEM_TIME` for partitioning by `RANGE` ## ALTER TABLE alter table t1 add partition ( partition p1 current); @@ -150,7 +160,7 @@ partition by system_time limit 1; alter table t1 change x big int; create or replace table t1 (i int) engine myisam partition by hash(i) partitions 2; alter table t1 add partition (partition px history); -ERROR HY000: Wrong partitioning type, expected type: `SYSTEM_TIME` +ERROR HY000: Wrong partition type `SYSTEM_TIME` for partitioning by `HASH` ## INSERT, UPDATE, DELETE create or replace table t1 (x int) with system versioning @@ -1140,7 +1150,7 @@ drop table t1; create table t1 (a int) with system versioning partition by system_time (partition p1 history, partition pn current); alter table t1 add partition (partition p2); -ERROR HY000: Wrong partitioning type, expected type: `SYSTEM_TIME` +ERROR HY000: Wrong partition type `HASH` for partitioning by `SYSTEM_TIME` # MDEV-17891 Assertion failures in select_insert::abort_result_set and # mysql_load upon attempt to replace into a full table set @@max_heap_table_size= 1024*1024; @@ -2314,6 +2324,15 @@ t1 CREATE TABLE `t1` ( PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X) drop tables t1, tp1; # +# MDEV-29841 Partition by system_time can be converted into table but not back +# +create or replace table t (a int) with system versioning +partition by system_time limit 10 partitions 3; +alter table t convert partition p0 to table tp; +alter table t convert table tp to partition p0; +ERROR HY000: CONVERT TABLE TO PARTITION can only be used on RANGE/LIST partitions +drop tables t, tp; +# # End of 10.7 tests # # diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test index decf470926f..e865ec3b9f6 100644 --- a/mysql-test/suite/versioning/t/partition.test +++ b/mysql-test/suite/versioning/t/partition.test @@ -107,6 +107,18 @@ partition by system_time ( partition p0 history, partition pn current); +--error ER_PARTITION_WRONG_TYPE +create or replace table t1 (a int) +partition by range (a) ( + partition p0 history, + partition p1 current); + +--error ER_PARTITION_WRONG_TYPE +create or replace table t1 (b int) +partition by range (a) ( + partition p0 current, + partition p1 history); + --echo ## ALTER TABLE @@ -1835,6 +1847,16 @@ drop tables t1, tp1; } --echo # +--echo # MDEV-29841 Partition by system_time can be converted into table but not back +--echo # +create or replace table t (a int) with system versioning +partition by system_time limit 10 partitions 3; +alter table t convert partition p0 to table tp; +--error ER_ONLY_ON_RANGE_LIST_PARTITION +alter table t convert table tp to partition p0; +drop tables t, tp; + +--echo # --echo # End of 10.7 tests --echo # |