diff options
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_io_thd_wait_for_disk_space.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_io_thd_wait_for_disk_space.test | 11 | ||||
-rw-r--r-- | mysys/errors.c | 3 | ||||
-rw-r--r-- | sql/log.cc | 8 |
4 files changed, 15 insertions, 9 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_io_thd_wait_for_disk_space.result b/mysql-test/suite/rpl/r/rpl_io_thd_wait_for_disk_space.result index c601c9a4169..b11ad4f53bd 100644 --- a/mysql-test/suite/rpl/r/rpl_io_thd_wait_for_disk_space.result +++ b/mysql-test/suite/rpl/r/rpl_io_thd_wait_for_disk_space.result @@ -7,7 +7,7 @@ CALL mtr.add_suppression("Retry in 60 secs"); include/stop_slave_sql.inc SET @@GLOBAL.DEBUG= 'd,simulate_io_thd_wait_for_disk_space'; INSERT INTO t1 VALUES(2); -include/wait_for_slave_param.inc [Slave_IO_State] +SET DEBUG_SYNC='now WAIT_FOR parked'; SET @@GLOBAL.DEBUG= '$debug_saved'; include/assert_grep.inc [Found the disk full error message on the slave] include/start_slave_sql.inc diff --git a/mysql-test/suite/rpl/t/rpl_io_thd_wait_for_disk_space.test b/mysql-test/suite/rpl/t/rpl_io_thd_wait_for_disk_space.test index 9eed1089e6d..6076be60ebc 100644 --- a/mysql-test/suite/rpl/t/rpl_io_thd_wait_for_disk_space.test +++ b/mysql-test/suite/rpl/t/rpl_io_thd_wait_for_disk_space.test @@ -42,16 +42,13 @@ SET @@GLOBAL.DEBUG= 'd,simulate_io_thd_wait_for_disk_space'; --connection master INSERT INTO t1 VALUES(2); ---connection slave -# Wait until IO thread is queuing events from master -# Notice that this is performed by querying SHOW SLAVE STATUS ---let $slave_param= Slave_IO_State ---let $slave_param_value= Queueing master event to the relay log ---source include/wait_for_slave_param.inc +--connection slave1 +SET DEBUG_SYNC='now WAIT_FOR parked'; -# Get the relay log file name, also using SHOW SLAVE STATUS +# Get the relay log file name using SHOW SLAVE STATUS --let $relay_log_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1) +--connection slave # Restore the debug options to "simulate" freed space on disk SET @@GLOBAL.DEBUG= '$debug_saved'; diff --git a/mysys/errors.c b/mysys/errors.c index 942fd3230c0..b6064460535 100644 --- a/mysys/errors.c +++ b/mysys/errors.c @@ -15,7 +15,7 @@ #include "mysys_priv.h" #include "mysys_err.h" - +#include "m_string.h" #ifndef SHARED_LIBRARY const char *globerrs[GLOBERRS]= @@ -128,6 +128,7 @@ void wait_for_free_space(const char *filename, int errors) }); (void) sleep(time_to_sleep); + DEBUG_SYNC_C("disk_full_reached"); } const char **get_global_errmsgs() diff --git a/sql/log.cc b/sql/log.cc index eab9a118147..a7f05905514 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -4452,6 +4452,14 @@ bool MYSQL_BIN_LOG::appendv(Master_info* mi, const char* buf, uint len,...) sufficient to block SQL thread when IO thread is updating relay log here. */ mysql_mutex_unlock(&mi->data_lock); + DBUG_EXECUTE_IF("simulate_io_thd_wait_for_disk_space", + { + const char act[]= "disk_full_reached SIGNAL parked"; + DBUG_ASSERT(opt_debug_sync_timeout > 0); + DBUG_ASSERT(!debug_sync_set_action(current_thd, + STRING_WITH_LEN(act))); + };); + do { if (my_b_append(&log_file,(uchar*) buf,len)) |