Skip to content

Commit d912a6d

Browse files
author
Sujatha Sivakumar
committed
Bug#22897202: RPL_IO_THD_WAIT_FOR_DISK_SPACE HAS OCCASIONAL
FAILURES Merge branch 'mysql-5.5' into mysql-5.6
2 parents 5ba2d87 + 3a8f43b commit d912a6d

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

mysql-test/suite/rpl/r/rpl_io_thd_wait_for_disk_space.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CALL mtr.add_suppression("Retry in 60 secs");
1010
include/stop_slave_sql.inc
1111
SET @@GLOBAL.DEBUG= 'd,simulate_io_thd_wait_for_disk_space';
1212
INSERT INTO t1 VALUES(2);
13-
include/wait_for_slave_param.inc [Slave_IO_State]
13+
set debug_sync='now WAIT_FOR parked';
1414
SET @@GLOBAL.DEBUG= '$debug_saved';
1515
include/assert_grep.inc [Found the disk full error message on the slave]
1616
include/start_slave_sql.inc

mysql-test/suite/rpl/t/rpl_io_thd_wait_for_disk_space.test

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,13 @@ SET @@GLOBAL.DEBUG= 'd,simulate_io_thd_wait_for_disk_space';
4242
--connection master
4343
INSERT INTO t1 VALUES(2);
4444

45-
--connection slave
46-
# Wait until IO thread is queuing events from master
47-
# Notice that this is performed by querying SHOW SLAVE STATUS
48-
--let $slave_param= Slave_IO_State
49-
--let $slave_param_value= Queueing master event to the relay log
50-
--source include/wait_for_slave_param.inc
45+
--connection slave1
46+
set debug_sync='now WAIT_FOR parked';
5147

5248
# Get the relay log file name, also using SHOW SLAVE STATUS
5349
--let $relay_log_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1)
5450

51+
--connection slave
5552
# Restore the debug options to "simulate" freed space on disk
5653
SET @@GLOBAL.DEBUG= '$debug_saved';
5754

mysys/errors.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include "mysys_priv.h"
1717
#include "mysys_err.h"
18+
#include "m_string.h"
1819

1920
#ifndef SHARED_LIBRARY
2021

@@ -129,6 +130,7 @@ void wait_for_free_space(const char *filename, int errors)
129130
});
130131

131132
(void) sleep(time_to_sleep);
133+
DEBUG_SYNC_C("disk_full_reached");
132134
}
133135

134136
const char **get_global_errmsgs()

sql/binlog.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5172,6 +5172,13 @@ bool MYSQL_BIN_LOG::append_buffer(const char* buf, uint len, Master_info *mi)
51725172
sufficient to block SQL thread when IO thread is updating relay log here.
51735173
*/
51745174
mysql_mutex_unlock(&mi->data_lock);
5175+
DBUG_EXECUTE_IF("simulate_io_thd_wait_for_disk_space",
5176+
{
5177+
const char act[]= "disk_full_reached SIGNAL parked";
5178+
DBUG_ASSERT(opt_debug_sync_timeout > 0);
5179+
DBUG_ASSERT(!debug_sync_set_action(current_thd,
5180+
STRING_WITH_LEN(act)));
5181+
};);
51755182
// write data
51765183
bool error= false;
51775184
if (my_b_append(&log_file,(uchar*) buf,len) == 0)

0 commit comments

Comments
 (0)