summaryrefslogtreecommitdiff
path: root/mysys/my_write.c
diff options
context:
space:
mode:
authorRohit Kalhans <rohit.kalhans@oracle.com>2012-05-29 12:21:17 +0530
committerRohit Kalhans <rohit.kalhans@oracle.com>2012-05-29 12:21:17 +0530
commit5b8308aef921723fbaaa2ae6bcbb4fe32879e65e (patch)
tree83f60814b3cdb2e45d040716ff335601b826ccb3 /mysys/my_write.c
parentca9a3a8915455ad2069572235f743a3dff1f6d5e (diff)
parent35d4c18ef46923d4d1102ea290365e5704574792 (diff)
downloadmariadb-git-5b8308aef921723fbaaa2ae6bcbb4fe32879e65e.tar.gz
upmerge from mysql-5.1 branch -> mysql-5.5 branch
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 c77c3a1cb2b..4b1ccb6fe41 100644
--- a/mysys/my_write.c
+++ b/mysys/my_write.c
@@ -40,6 +40,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)