| 1 |
--source include/have_debug.inc |
| 2 |
--source include/have_debug_sync.inc |
| 3 |
|
| 4 |
--disable_query_log |
| 5 |
SET @old_innodb_log_writer_threads = @@innodb_log_writer_threads; |
| 6 |
SET @old_innodb_flush_log_at_trx_commit = @@innodb_flush_log_at_trx_commit; |
| 7 |
--enable_query_log |
| 8 |
|
| 9 |
# Save the initial number of concurrent sessions |
| 10 |
--source include/count_sessions.inc |
| 11 |
|
| 12 |
SET GLOBAL innodb_flush_log_at_trx_commit = 1; |
| 13 |
|
| 14 |
--connect (con1,localhost,root,,) |
| 15 |
|
| 16 |
CREATE TABLE t1 (a CHAR(8)); |
| 17 |
|
| 18 |
# log flushed by writer threads |
| 19 |
SET GLOBAL innodb_log_writer_threads = ON; |
| 20 |
SET DEBUG_SYNC = 'RESET'; |
| 21 |
--connection con1 |
| 22 |
SET DEBUG_SYNC = 'log_flushed_by_writer SIGNAL log_flushed'; |
| 23 |
SET AUTOCOMMIT = 1; |
| 24 |
INSERT INTO t1 (a) VALUES ('a'); |
| 25 |
--connection default |
| 26 |
SET DEBUG_SYNC = 'now WAIT_FOR log_flushed'; |
| 27 |
|
| 28 |
# log flushed by user thread |
| 29 |
SET GLOBAL innodb_log_writer_threads = OFF; |
| 30 |
SET DEBUG_SYNC = 'RESET'; |
| 31 |
--connection con1 |
| 32 |
SET DEBUG_SYNC = 'log_flushed_by_self SIGNAL log_flushed'; |
| 33 |
SET AUTOCOMMIT = 1; |
| 34 |
INSERT INTO t1 (a) VALUES ('a'); |
| 35 |
--connection default |
| 36 |
SET DEBUG_SYNC = 'now WAIT_FOR log_flushed'; |
| 37 |
|
| 38 |
# Cleanup |
| 39 |
SET DEBUG_SYNC = 'RESET'; |
| 40 |
--disconnect con1 |
| 41 |
DROP TABLE t1; |
| 42 |
|
| 43 |
--disable_query_log |
| 44 |
SET GLOBAL innodb_log_writer_threads = @old_innodb_log_writer_threads; |
| 45 |
SET GLOBAL innodb_flush_log_at_trx_commit = @old_innodb_flush_log_at_trx_commit; |
| 46 |
--enable_query_log |
| 47 |
|
| 48 |
# Wait till all disconnects are completed. |
| 49 |
--source include/wait_until_count_sessions.inc |