diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2015-08-11 21:15:33 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2015-08-11 21:15:33 +0200 |
commit | 335ec7a363ffc49c5c974d45782220bf4977d846 (patch) | |
tree | 05929b48521cb97044f1c352285133b5efe3bac5 /storage/connect/tabjson.cpp | |
parent | 5f533035d3ad8dc56ef339196633a931d7bff60c (diff) | |
download | mariadb-git-335ec7a363ffc49c5c974d45782220bf4977d846.tar.gz |
Prevent wrong update of expanded columns when pretty is not 2.
modified: storage/connect/tabjson.cpp
Diffstat (limited to 'storage/connect/tabjson.cpp')
-rw-r--r-- | storage/connect/tabjson.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index fafba6228b9..211a58f0344 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -755,7 +755,7 @@ int TDBJSN::MakeTopTree(PGLOBAL g, PJSON jsp) } else strcpy(To_Line, s); - Row->Clear(); +// Row->Clear(); return false; } else return true; @@ -979,7 +979,8 @@ bool JSONCOL::ParseJpath(PGLOBAL g) if (!stricmp(Name, colp->GetName())) { Nod = colp->Nod; Nodes = colp->Nodes; - goto fin; + Xpd = colp->Xpd; + goto fin; } // endif Name sprintf(g->Message, "Cannot parse updated column %s", Name); @@ -1347,7 +1348,12 @@ PJSON JSONCOL::GetRow(PGLOBAL g) /***********************************************************************/ void JSONCOL::WriteColumn(PGLOBAL g) { - /*********************************************************************/ + if (Xpd && Tjp->Pretty < 2) { + strcpy(g->Message, "Cannot write expanded column when Pretty is not 2"); + longjmp(g->jumper[g->jump_level], 666); + } // endif Xpd + + /*********************************************************************/ /* Check whether this node must be written. */ /*********************************************************************/ if (Value != To_Val) |