Commit 42802452 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: reduce error injection noise in partitioning

parent b7bba721
--- alter_partition.result
+++ alter_partition,innodb.reject
@@ -12,12 +12,9 @@
end $
# QUERY: ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
# CRASH: crash_create_before_create_frm
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -33,12 +30,9 @@
12
22
# CRASH: crash_alter_partition_after_create_frm
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -54,12 +48,9 @@
12
22
# CRASH: crash_alter_partition_after_write_frm
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -75,12 +66,9 @@
12
22
# CRASH: crash_convert_partition_1
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -96,12 +84,9 @@
12
22
# CRASH: crash_convert_partition_2
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -117,12 +102,9 @@
12
22
# CRASH: crash_convert_partition_3
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -138,12 +120,9 @@
12
22
# CRASH: crash_convert_partition_4
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -159,12 +138,9 @@
12
22
# CRASH: crash_convert_partition_5
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -180,12 +156,9 @@
12
22
# CRASH: crash_convert_partition_6
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -201,12 +174,9 @@
12
22
# CRASH: crash_convert_partition_7
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -222,12 +192,9 @@
12
22
# CRASH: crash_convert_partition_8
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#p1.MYD
-t1#P#p1.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#pn.ibd
t1.frm
t1.par
Table Create Table
@@ -243,15 +210,12 @@
12
22
# CRASH: crash_convert_partition_9
-t1#P#p0.MYD
-t1#P#p0.MYI
-t1#P#pn.MYD
-t1#P#pn.MYI
+t1#P#p0.ibd
+t1#P#pn.ibd
t1.frm
t1.par
-tp1.MYD
-tp1.MYI
tp1.frm
+tp1.ibd
master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
Table Create Table
t1 CREATE TABLE `t1` (
......@@ -11,7 +11,7 @@ insert into t1 values (2), (12), (22);
flush tables;
end $
# QUERY: ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
# CRASH: ddl_log_create_before_create_frm
# CRASH: crash_create_before_create_frm
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p1.MYD
......@@ -32,7 +32,7 @@ x
2
12
22
# CRASH: ddl_log_alter_partition_after_create_frm
# CRASH: crash_alter_partition_after_create_frm
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p1.MYD
......@@ -53,7 +53,7 @@ x
2
12
22
# CRASH: ddl_log_alter_partition_after_write_frm
# CRASH: crash_alter_partition_after_write_frm
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p1.MYD
......
......@@ -37,9 +37,9 @@ if ($MTR_COMBINATION_ROW)
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let $crash_count= 12;
let $crash_points='ddl_log_create_before_create_frm',
'ddl_log_alter_partition_after_create_frm',
'ddl_log_alter_partition_after_write_frm',
let $crash_points='crash_create_before_create_frm',
'crash_alter_partition_after_create_frm',
'crash_alter_partition_after_write_frm',
'crash_convert_partition_1',
'crash_convert_partition_2',
'crash_convert_partition_3',
......@@ -104,7 +104,7 @@ while ($r < $statement_count)
RESET MASTER;
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--disable_reconnect
--eval set @@debug_dbug="+d,$crash",@debug_crash_counter=1
--eval set @@debug_dbug="+d,$crash"
let $errno=0;
--error 0,2013
--eval $statement;
......
This diff is collapsed.
......@@ -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)
......
......@@ -20,10 +20,9 @@
#include <my_sys.h> // pthread_mutex_t
#include "m_string.h" // LEX_CUSTRING
#define ERROR_INJECT_CRASH(code) \
(DBUG_IF(code) && (DBUG_SUICIDE(), false))
#define ERROR_INJECT_ERROR(code) \
(DBUG_IF(code) && (my_error(ER_UNKNOWN_ERROR, MYF(0)), 1))
#define ERROR_INJECT(code) \
((DBUG_IF("crash_" code) && (DBUG_SUICIDE(), 0)) || \
(DBUG_IF("fail_" code) && (my_error(ER_UNKNOWN_ERROR, MYF(0)), 1)))
class Alter_info;
class Alter_table_ctx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment