diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2015-12-13 18:39:32 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2015-12-13 18:39:32 +0100 |
commit | 8286b680b22a15e678badfc112831f47467d3dec (patch) | |
tree | 790b20a53cd056f04c445291f7b824ae22b6de44 /storage/connect/tabjson.cpp | |
parent | 541d36f7613cfacab8f35b40a7350f6ba54f514e (diff) | |
download | mariadb-git-8286b680b22a15e678badfc112831f47467d3dec.tar.gz |
- Copy error message from G to g when using temporary storage for parsing.
modified: storage/connect/tabjson.cpp
Diffstat (limited to 'storage/connect/tabjson.cpp')
-rw-r--r-- | storage/connect/tabjson.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 40fd9467269..17260836371 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -688,8 +688,13 @@ int TDBJSN::ReadDB(PGLOBAL g) Fpos++; M = 1; rc = RC_OK; + } else if (Pretty != 1 || strcmp(To_Line, "]")) { +#if USE_G + strcpy(g->Message, G->Message); +#endif + rc = RC_FX; } else - rc = (Pretty == 1 && !strcmp(To_Line, "]")) ? RC_EF : RC_FX; + rc = RC_EF; } // endif ReadDB @@ -793,6 +798,9 @@ int TDBJSN::MakeTopTree(PGLOBAL g, PJSON jsp) int rc = TDBDOS::WriteDB(g); #if USE_G + if (rc == RC_FX) + strcpy(g->Message, G->Message); + PlugSubSet(G, G->Sarea, G->Sarea_Size); #endif Row->Clear(); |