1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- Copy error message from G to g when using temporary storage for parsing.

modified:   storage/connect/tabjson.cpp
This commit is contained in:
Olivier Bertrand
2015-12-13 18:39:32 +01:00
parent 541d36f761
commit 8286b680b2

View File

@@ -688,8 +688,13 @@ int TDBJSN::ReadDB(PGLOBAL g)
Fpos++; Fpos++;
M = 1; M = 1;
rc = RC_OK; rc = RC_OK;
} else if (Pretty != 1 || strcmp(To_Line, "]")) {
#if USE_G
strcpy(g->Message, G->Message);
#endif
rc = RC_FX;
} else } else
rc = (Pretty == 1 && !strcmp(To_Line, "]")) ? RC_EF : RC_FX; rc = RC_EF;
} // endif ReadDB } // endif ReadDB
@@ -793,6 +798,9 @@ int TDBJSN::MakeTopTree(PGLOBAL g, PJSON jsp)
int rc = TDBDOS::WriteDB(g); int rc = TDBDOS::WriteDB(g);
#if USE_G #if USE_G
if (rc == RC_FX)
strcpy(g->Message, G->Message);
PlugSubSet(G, G->Sarea, G->Sarea_Size); PlugSubSet(G, G->Sarea, G->Sarea_Size);
#endif #endif
Row->Clear(); Row->Clear();