Commit 335ec7a3 authored by Olivier Bertrand's avatar Olivier Bertrand

Prevent wrong update of expanded columns when pretty is not 2.

  modified:   storage/connect/tabjson.cpp
parent 5f533035
...@@ -755,7 +755,7 @@ int TDBJSN::MakeTopTree(PGLOBAL g, PJSON jsp) ...@@ -755,7 +755,7 @@ int TDBJSN::MakeTopTree(PGLOBAL g, PJSON jsp)
} else } else
strcpy(To_Line, s); strcpy(To_Line, s);
Row->Clear(); // Row->Clear();
return false; return false;
} else } else
return true; return true;
...@@ -979,7 +979,8 @@ bool JSONCOL::ParseJpath(PGLOBAL g) ...@@ -979,7 +979,8 @@ bool JSONCOL::ParseJpath(PGLOBAL g)
if (!stricmp(Name, colp->GetName())) { if (!stricmp(Name, colp->GetName())) {
Nod = colp->Nod; Nod = colp->Nod;
Nodes = colp->Nodes; Nodes = colp->Nodes;
goto fin; Xpd = colp->Xpd;
goto fin;
} // endif Name } // endif Name
sprintf(g->Message, "Cannot parse updated column %s", Name); sprintf(g->Message, "Cannot parse updated column %s", Name);
...@@ -1347,7 +1348,12 @@ PJSON JSONCOL::GetRow(PGLOBAL g) ...@@ -1347,7 +1348,12 @@ PJSON JSONCOL::GetRow(PGLOBAL g)
/***********************************************************************/ /***********************************************************************/
void JSONCOL::WriteColumn(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. */ /* Check whether this node must be written. */
/*********************************************************************/ /*********************************************************************/
if (Value != To_Val) if (Value != To_Val)
......
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