diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-03-19 19:41:50 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-03-19 19:41:50 +0100 |
commit | 5746fcc9e1a6d3132ef8869ad6506f006882c7ff (patch) | |
tree | 4cca45198dcbe6a3b27152fa82e2f34b6fff19b4 /storage/connect/tabxml.cpp | |
parent | 19e9fa45eaece27ae325b0a3726e6dc5ba06d464 (diff) | |
download | mariadb-git-5746fcc9e1a6d3132ef8869ad6506f006882c7ff.tar.gz |
- Make INI and XML tables not writing null column values
modified:
mysql-test/suite/connect/r/dbf.result
storage/connect/tabsys.cpp
storage/connect/tabxml.cpp
storage/connect/tabxml.h
Diffstat (limited to 'storage/connect/tabxml.cpp')
-rw-r--r-- | storage/connect/tabxml.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 6099f9bffae..050902b9560 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -81,7 +81,6 @@ XMLDEF::XMLDEF(void) Limit = 0; Xpand = false; Usedom = false; - Skipnull = false; } // end of XMLDEF constructor /***********************************************************************/ @@ -144,7 +143,6 @@ bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) DefNs = Cat->GetStringCatInfo(g, Name, "DefNs", ""); Limit = Cat->GetIntCatInfo(Name, "Limit", 2); Xpand = (Cat->GetIntCatInfo(Name, "Expand", 0) != 0); - Skipnull = (Cat->GetIntCatInfo(Name, "Skipnull", 0) != 0); Header = Cat->GetIntCatInfo(Name, "Header", 0); Cat->GetCharCatInfo(Name, "Xmlsup", "*", buf, sizeof(buf)); @@ -227,7 +225,6 @@ TDBXML::TDBXML(PXMLDEF tdp) : TDBASE(tdp) Coltype = tdp->Coltype; Limit = tdp->Limit; Xpand = tdp->Xpand; - Skipnull = tdp->Skipnull; Changed = false; Checked = false; NextSame = false; @@ -272,7 +269,6 @@ TDBXML::TDBXML(PTDBXML tdbp) : TDBASE(tdbp) Coltype = tdbp->Coltype; Limit = tdbp->Limit; Xpand = tdbp->Xpand; - Skipnull = tdbp->Skipnull; Changed = tdbp->Changed; Checked = tdbp->Checked; NextSame = tdbp->NextSame; @@ -733,7 +729,6 @@ bool TDBXML::OpenDB(PGLOBAL g) /* OpenDB: initialize the XML file processing. */ /*********************************************************************/ Write = (Mode == MODE_INSERT || Mode == MODE_UPDATE); - Skipnull = (Skipnull && Mode == MODE_INSERT); if (Initialize(g)) return true; @@ -1256,7 +1251,7 @@ void XMLCOL::WriteColumn(PGLOBAL g) if (Value != To_Val) Value->SetValue_pval(To_Val, false); // Convert the updated value - if (Tdbp->Skipnull && Value->IsZero()) + if (Value->IsNull()) return; /*********************************************************************/ @@ -1476,7 +1471,7 @@ void XMULCOL::WriteColumn(PGLOBAL g) if (Value != To_Val) Value->SetValue_pval(To_Val, false); // Convert the updated value - if (Tdbp->Skipnull && Value->IsZero()) + if (Value->IsNull()) return; /*********************************************************************/ @@ -1692,7 +1687,7 @@ void XPOSCOL::WriteColumn(PGLOBAL g) if (Value != To_Val) Value->SetValue_pval(To_Val, false); // Convert the updated value - if (Tdbp->Skipnull && Value->IsZero()) + if (Value->IsNull()) return; /*********************************************************************/ |