diff options
author | Sujatha Sivakumar <sujatha.sivakumar@oracle.com> | 2013-03-28 14:18:51 +0530 |
---|---|---|
committer | Sujatha Sivakumar <sujatha.sivakumar@oracle.com> | 2013-03-28 14:18:51 +0530 |
commit | 9a1d651b0e905c5bd3bbb2d8bb68a95511a9a979 (patch) | |
tree | 924361342b42d301d8cdc1a60c902782b44c7961 /mysys/my_read.c | |
parent | af0e25725e69ad5a2671bb54db2e85dfa1dd770f (diff) | |
parent | d054027c4bfabdfa1cdbb58ee9aa34557eacbb45 (diff) | |
download | mariadb-git-9a1d651b0e905c5bd3bbb2d8bb68a95511a9a979.tar.gz |
Merge from mysql-5.1 to mysql-5.5
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 ca5fbfaeef6..680e13b8391 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 @@ -49,6 +49,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) { |