summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2017-07-30 11:45:49 +0300
committerSergei Golubchik <serg@mariadb.org>2017-08-24 01:05:52 +0200
commit8e722064f7e9899d830b130060c748239a07e79b (patch)
tree32a9545664f2bd108bc01f4fc76e1267b0a292dc
parent94bbe8ad5837ed53976d0d98bbcc7eb3faff7a0f (diff)
downloadmariadb-git-8e722064f7e9899d830b130060c748239a07e79b.tar.gz
Remove dumping of some not needed core's when running test suite
Before this patch running full mtr generated some 70 cores (at least on systemd). Now no cores should be generated. - Changed DBUG_ABORT()'s used by mysql-test-run to DBUG_SUICIDE() - Changed DBUG_ABORT() used to crash server with core to DBUG_ASSERT(0) - DBUG_ASSERT now flushes DBUG files
-rw-r--r--include/my_dbug.h4
-rw-r--r--sql/debug_sync.cc2
-rw-r--r--sql/opt_range.cc2
-rw-r--r--sql/sql_parse.cc2
-rw-r--r--sql/sys_vars.ic2
-rw-r--r--storage/maria/ha_maria.cc2
-rw-r--r--storage/maria/ma_blockrec.c2
-rw-r--r--storage/maria/ma_check.c6
-rw-r--r--storage/maria/ma_checkpoint.c4
-rw-r--r--storage/maria/ma_create.c2
-rw-r--r--storage/myisam/mi_close.c2
11 files changed, 15 insertions, 15 deletions
diff --git a/include/my_dbug.h b/include/my_dbug.h
index ac7b13ec294..1e0aaf680f8 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -102,8 +102,8 @@ extern const char* _db_get_func_(void);
#define DBUG_END() _db_end_ ()
#define DBUG_LOCK_FILE _db_lock_file_()
#define DBUG_UNLOCK_FILE _db_unlock_file_()
-#define DBUG_ASSERT(A) assert(A)
-#define DBUG_SLOW_ASSERT(A) assert(A)
+#define DBUG_ASSERT(A) ( _db_flush_(), assert(A) )
+#define DBUG_SLOW_ASSERT(A) ( _db_flush_(), assert(A) )
#define DBUG_ASSERT_EXISTS
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
diff --git a/sql/debug_sync.cc b/sql/debug_sync.cc
index f0bab73a048..94743a3b0af 100644
--- a/sql/debug_sync.cc
+++ b/sql/debug_sync.cc
@@ -1457,7 +1457,7 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action)
ER_DEBUG_SYNC_TIMEOUT,
ER_THD(thd, ER_DEBUG_SYNC_TIMEOUT));
thd->abort_on_warning= save_abort_on_warning;
- DBUG_EXECUTE_IF("debug_sync_abort_on_timeout", DBUG_ABORT(););
+ DBUG_EXECUTE_IF("debug_sync_abort_on_timeout", DBUG_ASSERT(0););
break;
}
error= 0;
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index e45772e9b0d..e7164ab41fa 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -10928,7 +10928,7 @@ int read_keys_and_merge_scans(THD *thd,
if (unique == NULL)
{
- DBUG_EXECUTE_IF("index_merge_may_not_create_a_Unique", DBUG_ABORT(); );
+ DBUG_EXECUTE_IF("index_merge_may_not_create_a_Unique", DBUG_SUICIDE(); );
DBUG_EXECUTE_IF("only_one_Unique_may_be_created",
DBUG_SET("+d,index_merge_may_not_create_a_Unique"); );
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 2370c1e4684..12f1d87ed9c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1592,7 +1592,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
DBUG_EXECUTE_IF("crash_dispatch_command_before",
{ DBUG_PRINT("crash_dispatch_command_before", ("now"));
- DBUG_ABORT(); });
+ DBUG_SUICIDE(); });
/* Performance Schema Interface instrumentation, begin */
thd->m_statement_psi= MYSQL_REFINE_STATEMENT(thd->m_statement_psi,
diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic
index 0b104625159..f3ce4467a5f 100644
--- a/sql/sys_vars.ic
+++ b/sql/sys_vars.ic
@@ -88,7 +88,7 @@
while(!(X)) \
{ \
fprintf(stderr, "Sysvar '%s' failed '%s'\n", name_arg, #X); \
- DBUG_ABORT(); \
+ DBUG_ASSERT(0); \
exit(255); \
}
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index fb4fcaed817..84bd1353134 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -2058,7 +2058,7 @@ int ha_maria::enable_indexes(uint mode)
DBUG_EXECUTE_IF("maria_crash_enable_index",
{
DBUG_PRINT("maria_crash_enable_index", ("now"));
- DBUG_ABORT();
+ DBUG_SUICIDE();
});
return error;
}
diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c
index a9476f25173..6432d55a8d3 100644
--- a/storage/maria/ma_blockrec.c
+++ b/storage/maria/ma_blockrec.c
@@ -3165,7 +3165,7 @@ static my_bool write_block_record(MARIA_HA *info,
translog_flush(translog_get_horizon());
});
DBUG_EXECUTE_IF("maria_crash",
- { DBUG_PRINT("maria_crash", ("now")); DBUG_ABORT(); });
+ { DBUG_PRINT("maria_crash", ("now")); DBUG_SUICIDE(); });
}
#endif
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c
index 84fba63a2f3..1ae5cb757a1 100644
--- a/storage/maria/ma_check.c
+++ b/storage/maria/ma_check.c
@@ -3175,7 +3175,7 @@ int maria_sort_index(HA_CHECK *param, register MARIA_HA *info, char *name)
DBUG_EXECUTE_IF("maria_crash_sort_index",
{
DBUG_PRINT("maria_crash_sort_index", ("now"));
- DBUG_ABORT();
+ DBUG_SUICIDE();
});
DBUG_RETURN(0);
@@ -3913,7 +3913,7 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
DBUG_EXECUTE_IF("maria_crash_create_index_by_sort",
{
DBUG_PRINT("maria_crash_create_index_by_sort", ("now"));
- DBUG_ABORT();
+ DBUG_SUICIDE();
});
if (scan_inited)
{
@@ -4124,7 +4124,7 @@ err:
DBUG_EXECUTE_IF("maria_crash_repair",
{
DBUG_PRINT("maria_crash_repair", ("now"));
- DBUG_ABORT();
+ DBUG_SUICIDE();
});
}
share->state.changed|= STATE_NOT_SORTED_PAGES;
diff --git a/storage/maria/ma_checkpoint.c b/storage/maria/ma_checkpoint.c
index c00278781ea..1cf07852623 100644
--- a/storage/maria/ma_checkpoint.c
+++ b/storage/maria/ma_checkpoint.c
@@ -131,7 +131,7 @@ int ma_checkpoint_execute(CHECKPOINT_LEVEL level, my_bool no_wait)
result= really_execute_checkpoint();
DBUG_EXECUTE_IF("maria_crash_after_checkpoint",
- { DBUG_PRINT("maria_crash", ("now")); DBUG_ABORT(); });
+ { DBUG_PRINT("maria_crash", ("now")); DBUG_SUICIDE(); });
mysql_cond_broadcast(&COND_checkpoint);
end:
@@ -426,7 +426,7 @@ void ma_checkpoint_end(void)
flush_all_tables(1);
});
DBUG_EXECUTE_IF("maria_crash",
- { DBUG_PRINT("maria_crash", ("now")); DBUG_ABORT(); });
+ { DBUG_PRINT("maria_crash", ("now")); DBUG_SUICIDE(); });
if (checkpoint_control.inited)
{
diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c
index e4cf20bf685..44436de0445 100644
--- a/storage/maria/ma_create.c
+++ b/storage/maria/ma_create.c
@@ -1141,7 +1141,7 @@ int maria_create(const char *name, enum data_file_type datafile_type,
DBUG_EXECUTE_IF("maria_crash_create_table",
{
DBUG_PRINT("maria_crash_create_table", ("now"));
- DBUG_ABORT();
+ DBUG_SUICIDE();
});
/*
store LSN into file, needed for Recovery to not be confused if a
diff --git a/storage/myisam/mi_close.c b/storage/myisam/mi_close.c
index f0a82bcef04..3681821697f 100644
--- a/storage/myisam/mi_close.c
+++ b/storage/myisam/mi_close.c
@@ -63,7 +63,7 @@ int mi_close(register MI_INFO *info)
if (flag)
{
DBUG_EXECUTE_IF("crash_before_flush_keys",
- if (share->kfile >= 0) DBUG_ABORT(););
+ if (share->kfile >= 0) DBUG_SUICIDE(););
if (share->kfile >= 0 &&
flush_key_blocks(share->key_cache, share->kfile,
&share->dirty_part_map,