diff options
Diffstat (limited to 'mysys/my_write.c')
-rw-r--r-- | mysys/my_write.c | 5 |
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) |