summaryrefslogtreecommitdiff
path: root/mysys/my_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_write.c')
-rw-r--r--mysys/my_write.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mysys/my_write.c b/mysys/my_write.c
index b545ab776b0..d0a59a605b6 100644
--- a/mysys/my_write.c
+++ b/mysys/my_write.c
@@ -36,6 +36,8 @@ size_t my_write(int Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
if (unlikely(!Count))
DBUG_RETURN(0);
+ DBUG_EXECUTE_IF ("simulate_file_write_error_once",
+ { DBUG_SET("+d,simulate_file_write_error");});
for (;;)
{
writenbytes= write(Filedes, Buffer, Count);
@@ -69,6 +71,8 @@ size_t my_write(int Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
{
wait_for_free_space(my_filename(Filedes), errors);
errors++;
+ DBUG_EXECUTE_IF("simulate_file_write_error_once",
+ { DBUG_SET("-d,simulate_file_write_error");});
continue;
}