diff options
Diffstat (limited to 'storage/archive/azio.c')
-rw-r--r-- | storage/archive/azio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/storage/archive/azio.c b/storage/archive/azio.c index fc54d98ab15..08c84c7c888 100644 --- a/storage/archive/azio.c +++ b/storage/archive/azio.c @@ -116,6 +116,15 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd) errno = 0; s->file = fd < 0 ? my_open(path, Flags, MYF(0)) : fd; + DBUG_EXECUTE_IF("simulate_archive_open_failure", + { + if (s->file >= 0) + { + my_close(s->file, MYF(0)); + s->file= -1; + my_errno= EMFILE; + } + }); if (s->file < 0 ) { |