summaryrefslogtreecommitdiff
path: root/storage/connect/plgdbutl.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2017-01-17 19:39:49 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2017-01-17 19:39:49 +0100
commit82913b0e909a3b8f10138f7f7cc759301f4c2026 (patch)
tree16aee581e5484379ce433bb91c5638ab75e31a0d /storage/connect/plgdbutl.cpp
parent43147681503299ccdf31e23e84dd39aeff52b2df (diff)
downloadmariadb-git-82913b0e909a3b8f10138f7f7cc759301f4c2026.tar.gz
Commit changes made for version 10.1
Diffstat (limited to 'storage/connect/plgdbutl.cpp')
-rw-r--r--storage/connect/plgdbutl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp
index 83975c6d8fa..01e9e476308 100644
--- a/storage/connect/plgdbutl.cpp
+++ b/storage/connect/plgdbutl.cpp
@@ -939,7 +939,11 @@ int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all)
#endif // LIBXML2_SUPPORT
#ifdef ZIP_SUPPORT
case TYPE_FB_ZIP:
- ((ZIPUTIL*)fp->File)->close();
+ if (fp->Mode == MODE_INSERT)
+ ((ZIPUTIL*)fp->File)->close();
+ else
+ ((UNZIPUTL*)fp->File)->close();
+
fp->Memory = NULL;
fp->Mode = MODE_ANY;
fp->Count = 0;