diff options
author | KiyoshiTakeda <d8sk4ueum@gmail.com> | 2022-05-18 23:38:56 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-18 23:38:56 +0900 |
commit | 8881c0100e2131077410b360b27b7af30db56e1a (patch) | |
tree | 96f8cfec07f0c443f12bbfe174176bca50361597 /mysql-test/main/partition_exchange.test | |
parent | c9b5a05341d7342db5f369493ea200b5fb9db243 (diff) | |
download | mariadb-git-8881c0100e2131077410b360b27b7af30db56e1a.tar.gz |
MDEV-14642 Assertion 'table->s->db_create_options == part_table->s->db_create_options' failed in compare_table_with_partition
When trying to execute ALTER TABLE EXCHANGE PARTITION with different
definitions, assertion
table->s->db_create_options == part_table->s->db_create_options
failed in compare_table_with_partition().
However, this execution should not be allowed since executing
'exchange partition' requires the identical structure of the two tables.
To fix the problem, I deleted the assertion code and added code that
returns an error that indicates tables have different definitions.
Reviewed By: Nayuta Yanagisawa
Diffstat (limited to 'mysql-test/main/partition_exchange.test')
-rw-r--r-- | mysql-test/main/partition_exchange.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/main/partition_exchange.test b/mysql-test/main/partition_exchange.test index cb33b8dd857..4125e998623 100644 --- a/mysql-test/main/partition_exchange.test +++ b/mysql-test/main/partition_exchange.test @@ -536,3 +536,21 @@ ALTER TABLE t2 REMOVE PARTITIONING; ALTER TABLE t1 EXCHANGE PARTITION pm WITH TABLE t2; DROP TABLE t1, t2; +--echo # +--echo # MDEV-14642 Assertion `table->s->db_create_options == part_table->s->db_create_options' failed in compare_table_with_partition +--echo # +CREATE TABLE t1 (a INT) ROW_FORMAT=DYNAMIC PARTITION BY KEY(a) PARTITIONS 2; +CREATE TABLE t2 (a INT) ; +--error ER_TABLES_DIFFERENT_METADATA +ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2; + +# Cleanup +DROP TABLE t1, t2; + +CREATE TABLE t1 (a INT, PRIMARY KEY(a)) ENGINE=InnoDB PARTITION BY KEY(a) PARTITIONS 2; +CREATE TABLE t2 (a INT, PRIMARY KEY(a)) CHECKSUM=1, ENGINE=InnoDB; +--error ER_TABLES_DIFFERENT_METADATA +ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; + +# Cleanup +DROP TABLE t1, t2; |