mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-22633 Assertion failed in prepare_inplace_alter_table_dict
prepare_inplace_alter_table_dict(): In the error handling, relax a debug assertion for the case that we did not execute dict_stats_wait_bg_to_stop_using_table() yet.
This commit is contained in:
parent
d2900d917f
commit
1893a1370d
1 changed files with 4 additions and 1 deletions
|
@ -4404,6 +4404,7 @@ prepare_inplace_alter_table_dict(
|
|||
create_table_info_t info(ctx->prebuilt->trx->mysql_thd, altered_table,
|
||||
ha_alter_info->create_info, NULL, NULL,
|
||||
srv_file_per_table);
|
||||
ut_d(bool stats_wait = false);
|
||||
|
||||
if (num_fts_index > 1) {
|
||||
my_error(ER_INNODB_FT_LIMIT, MYF(0));
|
||||
|
@ -4477,6 +4478,7 @@ prepare_inplace_alter_table_dict(
|
|||
XXX what may happen if bg stats opens the table after we
|
||||
have unlocked data dictionary below? */
|
||||
dict_stats_wait_bg_to_stop_using_table(user_table, ctx->trx);
|
||||
ut_d(stats_wait = true);
|
||||
|
||||
online_retry_drop_indexes_low(ctx->new_table, ctx->trx);
|
||||
|
||||
|
@ -5116,7 +5118,8 @@ error_handled:
|
|||
/* n_ref_count must be 1, because purge cannot
|
||||
be executing on this very table as we are
|
||||
holding dict_operation_lock X-latch. */
|
||||
DBUG_ASSERT(user_table->get_ref_count() == 1 || ctx->online);
|
||||
ut_ad(!stats_wait || ctx->online
|
||||
|| user_table->get_ref_count() == 1);
|
||||
|
||||
online_retry_drop_indexes_with_trx(user_table, ctx->trx);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue