diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-08-09 17:22:00 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-08-09 17:22:00 +0200 |
commit | d11829654c4ef5c3d0f997ca61a50d4bd196db8a (patch) | |
tree | e48a5775e961b17600bf9c1c189243deb5515ba7 /mysys | |
parent | e022b6ef07529d83e8c1cbd5e3d374fc5cc75721 (diff) | |
parent | 704898bf3200af4da42c1bf9251a7da5533db73f (diff) | |
download | mariadb-git-d11829654c4ef5c3d0f997ca61a50d4bd196db8a.tar.gz |
merge with MySQL 5.5.27
manually checked every change, reverted incorrect or stupid changes.
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_iocache2.c | 6 | ||||
-rw-r--r-- | mysys/my_write.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c index 3c23d0737e7..6c7cd9a7e84 100644 --- a/mysys/mf_iocache2.c +++ b/mysys/mf_iocache2.c @@ -433,7 +433,11 @@ process_flags: memset(buffz, '0', minimum_width - length2); else memset(buffz, ' ', minimum_width - length2); - my_b_write(info, buffz, minimum_width - length2); + if (my_b_write(info, buffz, minimum_width - length2)) + { + my_afree(buffz); + goto err; + } my_afree(buffz); } 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) |