summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache2.c
diff options
context:
space:
mode:
authorSujatha Sivakumar <sujatha.sivakumar@oracle.com>2013-03-28 14:18:51 +0530
committerSujatha Sivakumar <sujatha.sivakumar@oracle.com>2013-03-28 14:18:51 +0530
commit9a1d651b0e905c5bd3bbb2d8bb68a95511a9a979 (patch)
tree924361342b42d301d8cdc1a60c902782b44c7961 /mysys/mf_iocache2.c
parentaf0e25725e69ad5a2671bb54db2e85dfa1dd770f (diff)
parentd054027c4bfabdfa1cdbb58ee9aa34557eacbb45 (diff)
downloadmariadb-git-9a1d651b0e905c5bd3bbb2d8bb68a95511a9a979.tar.gz
Merge from mysql-5.1 to mysql-5.5
Diffstat (limited to 'mysys/mf_iocache2.c')
-rw-r--r--mysys/mf_iocache2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c
index 6339532fa16..6790489e786 100644
--- a/mysys/mf_iocache2.c
+++ b/mysys/mf_iocache2.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
@@ -63,6 +63,8 @@ my_b_copy_to_file(IO_CACHE *cache, FILE *file)
DBUG_RETURN(1);
cache->read_pos= cache->read_end;
} while ((bytes_in_cache= my_b_fill(cache)));
+ if(cache->error == -1)
+ DBUG_RETURN(1);
DBUG_RETURN(0);
}
@@ -219,6 +221,8 @@ size_t my_b_fill(IO_CACHE *info)
info->error= 0;
return 0; /* EOF */
}
+ DBUG_EXECUTE_IF ("simulate_my_b_fill_error",
+ {DBUG_SET("+d,simulate_file_read_error");});
if ((length= my_read(info->file,info->buffer,max_length,
info->myflags)) == (size_t) -1)
{