diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2016-12-14 14:20:23 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2016-12-14 14:20:23 +0100 |
commit | 952306502ebf1b26c627c5dc8b141581eeb30671 (patch) | |
tree | 571d99c7035ad62c489f88ead60e5cbf32a14a9e /storage/connect/tabdos.cpp | |
parent | d44723e62153d9fb4165d038e9448c20a3ad890b (diff) | |
download | mariadb-git-952306502ebf1b26c627c5dc8b141581eeb30671.tar.gz |
- MDEV-11295: developing handling files contained in ZIP file.
Enable using multiple zip files
modified: storage/connect/filamzip.cpp
modified: storage/connect/ha_connect.cc
modified: storage/connect/ha_connect.h
modified: storage/connect/mycat.h
modified: storage/connect/tabdos.cpp
modified: storage/connect/tabdos.h
modified: storage/connect/tabfmt.cpp
modified: storage/connect/tabjson.cpp
Diffstat (limited to 'storage/connect/tabdos.cpp')
-rw-r--r-- | storage/connect/tabdos.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp index 9bcac0b5f1a..f47e66b014b 100644 --- a/storage/connect/tabdos.cpp +++ b/storage/connect/tabdos.cpp @@ -96,11 +96,12 @@ DOSDEF::DOSDEF(void) Pseudo = 3; Fn = NULL; Ofn = NULL; - Zipfn = NULL; + Entry = NULL; To_Indx = NULL; Recfm = RECFM_VAR; Mapped = false; - Padded = false; + Zipped = false; + Padded = false; Huge = false; Accept = false; Eof = false; @@ -131,20 +132,11 @@ bool DOSDEF::DefineAM(PGLOBAL g, LPCSTR am, int) : (am && !stricmp(am, "DBF")) ? "D" : "V"; if (*dfm != 'D') - Zipfn = GetStringCatInfo(g, "Zipfile", NULL); - - if (Zipfn && Multiple) { - // Prevent Fn to default to table name - Desc = GetStringCatInfo(g, "Filename", NULL); - Fn = GetStringCatInfo(g, "Filename", "<%>"); - - if (!strcmp(Fn, "<%>")) - Fn = NULL; - - } else - Desc = Fn = GetStringCatInfo(g, "Filename", NULL); + Zipped = GetBoolCatInfo("Zipped", false); + Desc = Fn = GetStringCatInfo(g, "Filename", NULL); Ofn = GetStringCatInfo(g, "Optname", Fn); + Entry = GetStringCatInfo(g, "Entry", NULL); GetCharCatInfo("Recfm", (PSZ)dfm, buf, sizeof(buf)); Recfm = (toupper(*buf) == 'F') ? RECFM_FIX : (toupper(*buf) == 'B') ? RECFM_BIN : @@ -350,7 +342,7 @@ PTDB DOSDEF::GetTable(PGLOBAL g, MODE mode) /* Allocate table and file processing class of the proper type. */ /* Column blocks will be allocated only when needed. */ /*********************************************************************/ - if (Zipfn) { + if (Zipped) { #if defined(ZIP_SUPPORT) if (Recfm == RECFM_VAR) txfp = new(g) ZIPFAM(this); @@ -358,7 +350,6 @@ PTDB DOSDEF::GetTable(PGLOBAL g, MODE mode) txfp = new(g) ZPXFAM(this); tdbp = new(g) TDBDOS(this, txfp); - return tdbp; #else // !ZIP_SUPPORT strcpy(g->Message, "ZIP not supported"); return NULL; |