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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user