diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-17 21:24:29 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-17 21:24:29 +0200 |
commit | 97e640b9ae83e07b444fceede6b0524256c7a3cc (patch) | |
tree | 8f48fbfaf88ea7895ce59fd3ac2fbe6184334387 /mysys/my_read.c | |
parent | 2f6a2494a5eb2cf3ab06fbedd2584eca85d90230 (diff) | |
parent | c7973615e723b13c6457b494b72be2fac35bfd18 (diff) | |
download | mariadb-git-97e640b9ae83e07b444fceede6b0524256c7a3cc.tar.gz |
5.5 merge
Diffstat (limited to 'mysys/my_read.c')
-rw-r--r-- | mysys/my_read.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mysys/my_read.c b/mysys/my_read.c index 66b7f6d353d..922da5a7e95 100644 --- a/mysys/my_read.c +++ b/mysys/my_read.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,6 +51,13 @@ size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags) #else readbytes= read(Filedes, Buffer, Count); #endif + DBUG_EXECUTE_IF ("simulate_file_read_error", + { + errno= ENOSPC; + readbytes= (size_t) -1; + DBUG_SET("-d,simulate_file_read_error"); + DBUG_SET("-d,simulate_my_b_fill_error"); + }); if (readbytes != Count) { |