diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2020-07-13 16:30:57 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2020-07-13 16:30:57 +0200 |
commit | 1e07df99f30842f5479eaf068ce4131023615721 (patch) | |
tree | 85e3697fb9d08bb45cd812c225f16c97117d5441 /storage/connect/filamzip.h | |
parent | 2654ddd2d595c2f8528aafa3af30db90beb0a5b7 (diff) | |
download | mariadb-git-1e07df99f30842f5479eaf068ce4131023615721.tar.gz |
- Fix MDEV-22561 Unable to access DBF inside a ZIP archive
modified: storage/connect/filamdbf.cpp
modified: storage/connect/filamdbf.h
modified: storage/connect/filamzip.cpp
modified: storage/connect/filamzip.h
modified: storage/connect/ha_connect.cc
modified: storage/connect/plgxml.cpp
modified: storage/connect/tabdos.cpp
modified: storage/connect/tabdos.h
modified: storage/connect/tabfix.h
- Add/Init Level class member
modified: storage/connect/mongo.cpp
modified: storage/connect/mongo.h
modified: storage/connect/tabjson.cpp
modified: storage/connect/tabjson.h
- Typo
modified: storage/connect/connect.cc
Diffstat (limited to 'storage/connect/filamzip.h')
-rw-r--r-- | storage/connect/filamzip.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/storage/connect/filamzip.h b/storage/connect/filamzip.h index be17d954728..7ff1fb0a543 100644 --- a/storage/connect/filamzip.h +++ b/storage/connect/filamzip.h @@ -1,7 +1,7 @@ /************** filamzip H Declares Source Code File (.H) **************/ -/* Name: filamzip.h Version 1.2 */ +/* Name: filamzip.h Version 1.3 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2016-2017 */ +/* (C) Copyright to the author Olivier BERTRAND 2016-2020 */ /* */ /* This file contains the ZIP file access method classes declares. */ /***********************************************************************/ @@ -11,6 +11,7 @@ #include "block.h" #include "filamap.h" #include "filamfix.h" +#include "filamdbf.h" #include "zip.h" #include "unzip.h" @@ -18,6 +19,7 @@ typedef class UNZFAM *PUNZFAM; typedef class UZXFAM *PUZXFAM; +typedef class UZDFAM* PUZDFAM; typedef class ZIPFAM *PZIPFAM; typedef class ZPXFAM *PZPXFAM; @@ -53,7 +55,7 @@ class DllExport ZIPUTIL : public BLOCK { class DllExport UNZIPUTL : public BLOCK { public: // Constructor - UNZIPUTL(PCSZ tgt, bool mul); + UNZIPUTL(PCSZ tgt, PCSZ pw, bool mul); UNZIPUTL(PDOSDEF tdp); // Implementation @@ -144,6 +146,36 @@ class DllExport UZXFAM : public MPXFAM { }; // end of UZXFAM /***********************************************************************/ +/* This is the fixed unzip file access method. */ +/***********************************************************************/ +class DllExport UZDFAM : public DBMFAM { + //friend class UNZFAM; +public: + // Constructors + UZDFAM(PDOSDEF tdp); + UZDFAM(PUZDFAM txfp); + + // Implementation + virtual AMT GetAmType(void) { return TYPE_AM_ZIP; } + virtual PTXF Duplicate(PGLOBAL g) { return (PTXF) new(g)UZDFAM(this); } + + // Methods + virtual int GetFileLength(PGLOBAL g); + virtual int Cardinality(PGLOBAL g); + virtual bool OpenTableFile(PGLOBAL g); + virtual int GetNext(PGLOBAL g); + //virtual int ReadBuffer(PGLOBAL g); + +protected: + int dbfhead(PGLOBAL g, void* buf); + int ScanHeader(PGLOBAL g, int* rln); + + // Members + UNZIPUTL* zutp; + PDOSDEF tdfp; +}; // end of UZDFAM + +/***********************************************************************/ /* This is the zip file access method. */ /***********************************************************************/ class DllExport ZIPFAM : public DOSFAM { |