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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mysys/my_write.c b/mysys/my_write.c
index dc04b60f613..c4cba7a927d 100644
--- a/mysys/my_write.c
+++ b/mysys/my_write.c
@@ -47,6 +47,11 @@ size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
#else
writtenbytes= write(Filedes, Buffer, Count);
#endif
+ DBUG_EXECUTE_IF("simulate_file_write_error",
+ {
+ errno= ENOSPC;
+ writtenbytes= (size_t) -1;
+ });
if (writtenbytes == Count)
break;
if (writtenbytes != (size_t) -1)