1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
KiyoshiTakeda
2022-05-18 23:38:56 +09:00
committed by GitHub
parent c9b5a05341
commit 8881c0100e
3 changed files with 38 additions and 2 deletions

View File

@ -249,8 +249,13 @@ static bool compare_table_with_partition(THD *thd, TABLE *table,
my_error(ER_TABLES_DIFFERENT_METADATA, MYF(0));
DBUG_RETURN(TRUE);
}
DBUG_ASSERT(table->s->db_create_options ==
part_table->s->db_create_options);
if (table->s->db_create_options != part_table->s->db_create_options)
{
my_error(ER_TABLES_DIFFERENT_METADATA, MYF(0));
DBUG_RETURN(TRUE);
}
DBUG_ASSERT(table->s->db_options_in_use ==
part_table->s->db_options_in_use);