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

cleanup: reduce error injection noise in partitioning

This commit is contained in:
Sergei Golubchik
2021-09-12 19:06:18 +02:00
parent b7bba721ee
commit 428024524c
6 changed files with 250 additions and 96 deletions

View File

@ -810,10 +810,9 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags)
DBUG_ASSERT(!create_info->tmp_table());
if (ddl_log_create_table(thd, part_info, create_info->db_type, &new_path,
&alter_ctx->new_db, &alter_ctx->new_name, true) ||
ERROR_INJECT_ERROR("fail_create_before_create_frm"))
ERROR_INJECT("create_before_create_frm"))
DBUG_RETURN(TRUE);
debug_crash_here("ddl_log_create_before_create_frm");
if (mysql_prepare_create_table(thd, create_info, lpt->alter_info,
&lpt->db_options, file,
&lpt->key_info_buffer, &lpt->key_count,
@ -832,18 +831,17 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags)
thd->work_part_info= work_part_info;
create_info->db_type= db_type;
debug_crash_here("ddl_log_alter_partition_after_create_frm");
ERROR_INJECT("alter_partition_after_create_frm");
error= writefile(frm_name, alter_ctx->new_db.str, alter_ctx->new_name.str,
create_info->tmp_table(), frm.str, frm.length);
my_free((void *) frm.str);
if (unlikely(error) || ERROR_INJECT_ERROR("fail_alter_partition_after_write_frm"))
if (unlikely(error) || ERROR_INJECT("alter_partition_after_write_frm"))
{
mysql_file_delete(key_file_frm, frm_name, MYF(0));
DBUG_RETURN(TRUE);
}
debug_crash_here("ddl_log_alter_partition_after_write_frm");
DBUG_RETURN(false);
}
if (flags & WFRM_BACKUP_ORIGINAL)