mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-20310: Make InnoDB crash tests Valgrind-friendly
Use DEBUG_SYNC to hang the execution at the interesting point, and then kill and restart the server externally. This will work also with Valgrind. DBUG_SUICIDE() causes Valgrind to hang, and it could also cause uninteresting reports about memory leaks. While we are at it, let us clean up innodb.innodb_bulk_create_index_debug so that it will actually test the desired functionality also in future versions (with instant ADD COLUMN and DROP COLUMN) and avoid some unnecessary restarts. We are adding two DEBUG_SYNC points for ALTER TABLE, because there were none that would be executed right before ha_commit_trans().
This commit is contained in:
@ -9788,6 +9788,7 @@ end_temporary:
|
||||
(ulong) (copied + deleted), (ulong) deleted,
|
||||
(ulong) thd->get_stmt_da()->current_statement_warn_count());
|
||||
my_ok(thd, copied + deleted, 0L, alter_ctx.tmp_name);
|
||||
DEBUG_SYNC(thd, "alter_table_inplace_trans_commit");
|
||||
DBUG_RETURN(false);
|
||||
|
||||
err_new_table_cleanup:
|
||||
@ -9889,12 +9890,14 @@ bool mysql_trans_commit_alter_copy_data(THD *thd)
|
||||
uint save_unsafe_rollback_flags;
|
||||
DBUG_ENTER("mysql_trans_commit_alter_copy_data");
|
||||
|
||||
/* Save flags as transcommit_implicit_are_deleting_them */
|
||||
/* Save flags as trans_commit_implicit are deleting them */
|
||||
save_unsafe_rollback_flags= thd->transaction.stmt.m_unsafe_rollback_flags;
|
||||
|
||||
DEBUG_SYNC(thd, "alter_table_copy_trans_commit");
|
||||
|
||||
if (ha_enable_transaction(thd, TRUE))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
|
||||
/*
|
||||
Ensure that the new table is saved properly to disk before installing
|
||||
the new .frm.
|
||||
|
Reference in New Issue
Block a user