summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2010-10-18 13:27:52 +0200
committerTor Didriksen <tor.didriksen@oracle.com>2010-10-18 13:27:52 +0200
commit367549ab2bb162b68cc5fab9594d1f69b6a70f97 (patch)
tree01cbf172208b6ccd3319a10828e980e63b765ce5 /sql/log.cc
parentb1b7e534ef6425ef0db53ba547cd09346ee61e3f (diff)
parent08531533466732294306afe1c216f66a61b929cb (diff)
downloadmariadb-git-367549ab2bb162b68cc5fab9594d1f69b6a70f97.tar.gz
Bug#52172 test binlog.binlog_index needs --skip-core-file to avoid leaving core files
For crash testing: kill the server without generating core file. include/my_dbug.h Use kill(getpid(), SIGKILL) which cannot be caught by signal handlers. All DBUG_XXX macros should be no-ops in optimized mode, do that for DBUG_ABORT as well. sql/handler.cc Kill server without generating core. sql/log.cc Kill server without generating core.
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 0e15c3b8e79..68ae6fd724e 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -2849,7 +2849,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
sql_print_error("MSYQL_BIN_LOG::open failed to sync the index file.");
DBUG_RETURN(1);
}
- DBUG_EXECUTE_IF("crash_create_non_critical_before_update_index", DBUG_ABORT(););
+ DBUG_EXECUTE_IF("crash_create_non_critical_before_update_index", DBUG_SUICIDE(););
#endif
write_error= 0;
@@ -2946,7 +2946,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
if (write_file_name_to_index_file)
{
#ifdef HAVE_REPLICATION
- DBUG_EXECUTE_IF("crash_create_critical_before_update_index", DBUG_ABORT(););
+ DBUG_EXECUTE_IF("crash_create_critical_before_update_index", DBUG_SUICIDE(););
#endif
DBUG_ASSERT(my_b_inited(&index_file) != 0);
@@ -2965,7 +2965,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
goto err;
#ifdef HAVE_REPLICATION
- DBUG_EXECUTE_IF("crash_create_after_update_index", DBUG_ABORT(););
+ DBUG_EXECUTE_IF("crash_create_after_update_index", DBUG_SUICIDE(););
#endif
}
}
@@ -3428,7 +3428,7 @@ int MYSQL_BIN_LOG::purge_first_log(Relay_log_info* rli, bool included)
/* Store where we are in the new file for the execution thread */
flush_relay_log_info(rli);
- DBUG_EXECUTE_IF("crash_before_purge_logs", DBUG_ABORT(););
+ DBUG_EXECUTE_IF("crash_before_purge_logs", DBUG_SUICIDE(););
mysql_mutex_lock(&rli->log_space_lock);
rli->relay_log.purge_logs(to_purge_if_included, included,
@@ -3556,7 +3556,7 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
break;
}
- DBUG_EXECUTE_IF("crash_purge_before_update_index", DBUG_ABORT(););
+ DBUG_EXECUTE_IF("crash_purge_before_update_index", DBUG_SUICIDE(););
if ((error= sync_purge_index_file()))
{
@@ -3571,7 +3571,7 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
goto err;
}
- DBUG_EXECUTE_IF("crash_purge_critical_after_update_index", DBUG_ABORT(););
+ DBUG_EXECUTE_IF("crash_purge_critical_after_update_index", DBUG_SUICIDE(););
err:
/* Read each entry from purge_index_file and delete the file. */
@@ -3581,7 +3581,7 @@ err:
" that would be purged.");
close_purge_index_file();
- DBUG_EXECUTE_IF("crash_purge_non_critical_after_update_index", DBUG_ABORT(););
+ DBUG_EXECUTE_IF("crash_purge_non_critical_after_update_index", DBUG_SUICIDE(););
if (need_mutex)
mysql_mutex_unlock(&LOCK_index);
@@ -5177,7 +5177,7 @@ bool MYSQL_BIN_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event,
DBUG_PRINT("info", ("error writing binlog cache: %d",
write_error));
DBUG_PRINT("info", ("crashing before writing xid"));
- DBUG_ABORT();
+ DBUG_SUICIDE();
});
if ((write_error= write_cache(cache, false, false)))
@@ -5192,7 +5192,7 @@ bool MYSQL_BIN_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event,
bool synced= 0;
if (flush_and_sync(&synced))
goto err;
- DBUG_EXECUTE_IF("half_binlogged_transaction", DBUG_ABORT(););
+ DBUG_EXECUTE_IF("half_binlogged_transaction", DBUG_SUICIDE(););
if (cache->error) // Error on read
{
sql_print_error(ER(ER_ERROR_ON_READ), cache->file_name, errno);