summaryrefslogtreecommitdiff
path: root/storage/connect/plgxml.h
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2016-12-23 16:58:32 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2016-12-23 16:58:32 +0100
commite6b563f8be68d57df2a4c9b8e2b6c130855b18e4 (patch)
tree4aa72a2eb96696302cfc996e28ccdf76d9bfdeaa /storage/connect/plgxml.h
parent952306502ebf1b26c627c5dc8b141581eeb30671 (diff)
downloadmariadb-git-e6b563f8be68d57df2a4c9b8e2b6c130855b18e4.tar.gz
Fix some XML table type bugs:
- in DOMNODELIST::DropItem if (Listp == NULL || Listp->length <= n) return true; is wrong, should be: if (Listp == NULL || Listp->length < n) return true; - Crash in discovery with libxml2 in XMLColumns because: if (!tdp->Usedom) // nl was destroyed vp->nl = vp->pn->GetChildElements(g); is executed with vp->pn uninitialized. Fixed by adding: vp->pn = node; line 264. -In discovery with libxml2 some columns are not found. Because list was not recovered properly, nodes being modified and not reallocated. Fixed lines 214 and 277. modified: storage/connect/domdoc.cpp modified: storage/connect/tabxml.cpp Add support for zipped table files modified: storage/connect/domdoc.cpp modified: storage/connect/domdoc.h modified: storage/connect/filamap.cpp modified: storage/connect/filamap.h modified: storage/connect/filamzip.cpp modified: storage/connect/filamzip.h modified: storage/connect/ha_connect.cc modified: storage/connect/libdoc.cpp modified: storage/connect/plgdbutl.cpp modified: storage/connect/plgxml.cpp modified: storage/connect/plgxml.h modified: storage/connect/tabdos.cpp modified: storage/connect/tabdos.h modified: storage/connect/tabfmt.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabxml.cpp
Diffstat (limited to 'storage/connect/plgxml.h')
-rw-r--r--storage/connect/plgxml.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/storage/connect/plgxml.h b/storage/connect/plgxml.h
index b8e914e0bf1..db7dfa6bda5 100644
--- a/storage/connect/plgxml.h
+++ b/storage/connect/plgxml.h
@@ -1,3 +1,7 @@
+#if defined(ZIP_SUPPORT)
+#include "filamzip.h"
+#endif // ZIP_SUPPORT
+
/******************************************************************/
/* Dual XML implementation base classes defines. */
/******************************************************************/
@@ -72,8 +76,8 @@ class XMLDOCUMENT : public BLOCK {
virtual void SetNofree(bool b) = 0;
// Methods
- virtual bool Initialize(PGLOBAL) = 0;
- virtual bool ParseFile(char *) = 0;
+ virtual bool Initialize(PGLOBAL, char *, bool) = 0;
+ virtual bool ParseFile(PGLOBAL, char *) = 0;
virtual bool NewDoc(PGLOBAL, char *) = 0;
virtual void AddComment(PGLOBAL, char *) = 0;
virtual PXNODE GetRoot(PGLOBAL) = 0;
@@ -91,8 +95,16 @@ class XMLDOCUMENT : public BLOCK {
// Utility
bool MakeNSlist(PGLOBAL g);
+ bool InitZip(PGLOBAL g, char *entry);
+ char *GetMemDoc(PGLOBAL g, char *fn);
+ void CloseZip(void);
// Members
+#if defined(ZIP_SUPPORT)
+ ZIPUTIL *zip; /* Used for zipped file */
+#else // !ZIP_SUPPORT
+ bool zip; /* Always false */
+#endif // !ZIP_SUPPORT
PNS Namespaces; /* To the namespaces */
char *Encoding; /* The document encoding */
char *Nslist; /* Namespace list */