Commit 41acc81f authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix...

- Fix https://stackoverflow.com/questions/60625778/import-complex-xml-from-multiple-files-in-mariadb/60637429#60637429
  Import complex XML from multiple files in MariaDB
  Some row results are missing and replaced by the last file one.
  Thats because Nx and Sx column members are not reset when changing file.
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h
parent 85f2217c
......@@ -813,13 +813,16 @@ bool TDBXML::Initialize(PGLOBAL g)
if (Void)
return false;
if (Columns && !Bufdone) {
if (Columns) {
// Allocate the buffers that will contain node values
for (colp = (PXMLCOL)Columns; colp; colp = (PXMLCOL)colp->GetNext())
if (!colp->IsSpecial()) // Not a pseudo column
if (colp->AllocBuf(g, Mode == MODE_INSERT))
if (!colp->IsSpecial()) { // Not a pseudo column
if (!Bufdone && colp->AllocBuf(g, Mode == MODE_INSERT))
return true;
colp->Nx = colp->Sx = -1;
} // endif Special
Bufdone = true;
} // endif Bufdone
......
......@@ -157,6 +157,7 @@ class DllExport TDBXML : public TDBASE {
/* Class XMLCOL: XDB table access method column descriptor. */
/***********************************************************************/
class XMLCOL : public COLBLK {
friend class TDBXML;
public:
// Constructors
XMLCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PCSZ am = "XML");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment