diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2020-03-11 23:14:19 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2020-03-11 23:14:19 +0100 |
commit | 41acc81f4d90df7b080722d276fe7cd0ca66e8e7 (patch) | |
tree | 35b63fee7e8c132c29f6719d533db93d70924601 /storage/connect/tabxml.cpp | |
parent | 85f2217cc852c290244e19a339669d0520b28eb5 (diff) | |
download | mariadb-git-41acc81f4d90df7b080722d276fe7cd0ca66e8e7.tar.gz |
- 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
Diffstat (limited to 'storage/connect/tabxml.cpp')
-rw-r--r-- | storage/connect/tabxml.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 717090e9c5a..68941c67be8 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -813,12 +813,15 @@ 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)) - return true; + 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 |