summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2014-03-21 23:58:11 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2014-03-21 23:58:11 +0100
commit21d9c5824b92d28eb38c4346d4c06f47526aa33d (patch)
tree8153c9eebedb013f2230eb4dbd231a3a6aa48d2e /storage/connect
parent70e865cc1934018e3a4fb14084fcbb19621b123d (diff)
downloadmariadb-git-21d9c5824b92d28eb38c4346d4c06f47526aa33d.tar.gz
- Fix bug MDEV-5928
modified: storage/connect/tabxml.cpp
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/tabxml.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp
index 7a2c0169c2b..77dc7617e8a 100644
--- a/storage/connect/tabxml.cpp
+++ b/storage/connect/tabxml.cpp
@@ -1326,14 +1326,11 @@ void XMLCOL::WriteColumn(PGLOBAL g)
if (Value != To_Val)
Value->SetValue_pval(To_Val, false); // Convert the updated value
- if (Value->IsNull())
- return;
-
/*********************************************************************/
/* If a check pass was done while updating, all node contruction */
/* has been already one. */
/*********************************************************************/
- if (Status && Tdbp->Checked) {
+ if (Status && Tdbp->Checked && !Value->IsNull()) {
assert (ColNode != NULL);
assert ((Type ? (void *)ValNode : (void *)AttNode) != NULL);
goto fin;
@@ -1347,6 +1344,12 @@ void XMLCOL::WriteColumn(PGLOBAL g)
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
/*********************************************************************/
+ /* Null values are represented by no node. */
+ /*********************************************************************/
+ if (Value->IsNull())
+ return;
+
+ /*********************************************************************/
/* Find the column and value nodes to update or insert. */
/*********************************************************************/
if (Tdbp->Clist) {