--source include/have_debug.inc --source include/have_debug_sync.inc --disable_query_log SET @old_innodb_log_writer_threads = @@innodb_log_writer_threads; SET @old_innodb_flush_log_at_trx_commit = @@innodb_flush_log_at_trx_commit; --enable_query_log # Save the initial number of concurrent sessions --source include/count_sessions.inc SET GLOBAL innodb_flush_log_at_trx_commit = 1; --connect (con1,localhost,root,,) CREATE TABLE t1 (a CHAR(8)); # log flushed by writer threads SET GLOBAL innodb_log_writer_threads = ON; SET DEBUG_SYNC = 'RESET'; --connection con1 SET DEBUG_SYNC = 'log_flushed_by_writer SIGNAL log_flushed'; SET AUTOCOMMIT = 1; INSERT INTO t1 (a) VALUES ('a'); --connection default SET DEBUG_SYNC = 'now WAIT_FOR log_flushed'; # log flushed by user thread SET GLOBAL innodb_log_writer_threads = OFF; SET DEBUG_SYNC = 'RESET'; --connection con1 SET DEBUG_SYNC = 'log_flushed_by_self SIGNAL log_flushed'; SET AUTOCOMMIT = 1; INSERT INTO t1 (a) VALUES ('a'); --connection default SET DEBUG_SYNC = 'now WAIT_FOR log_flushed'; # Cleanup SET DEBUG_SYNC = 'RESET'; --disconnect con1 DROP TABLE t1; --disable_query_log SET GLOBAL innodb_log_writer_threads = @old_innodb_log_writer_threads; SET GLOBAL innodb_flush_log_at_trx_commit = @old_innodb_flush_log_at_trx_commit; --enable_query_log # Wait till all disconnects are completed. --source include/wait_until_count_sessions.inc