mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Fix a bug that caused a crash when doing delete on a json table with wrong syntax file
- Suppress MYSQL_SUPPORT preprocessor variable
This commit is contained in:
@@ -1540,12 +1540,11 @@ int TDBJSON::MakeNewDoc(PGLOBAL g)
|
||||
int TDBJSON::MakeDocument(PGLOBAL g)
|
||||
{
|
||||
char filename[_MAX_PATH];
|
||||
int rc = RC_OK;
|
||||
DWORD drc;
|
||||
|
||||
if (Done)
|
||||
return RC_OK;
|
||||
else
|
||||
Done = true;
|
||||
|
||||
// Now open the JSON file
|
||||
PlugSetPath(filename, Txfp->To_File, GetPath());
|
||||
@@ -1553,16 +1552,11 @@ int TDBJSON::MakeDocument(PGLOBAL g)
|
||||
/*********************************************************************/
|
||||
/* Get top of the parsed tree and the inside table document. */
|
||||
/*********************************************************************/
|
||||
Top = MakeJsonTree(g, filename, Objname, Pretty, Doc, drc);
|
||||
if (!(Top = MakeJsonTree(g, filename, Objname, Pretty, Doc, drc)))
|
||||
rc = (drc == ENOENT && Mode == MODE_INSERT) ? MakeNewDoc(g) : RC_FX;
|
||||
|
||||
if (!Top) {
|
||||
if (drc != ENOENT || Mode != MODE_INSERT)
|
||||
return RC_FX;
|
||||
|
||||
return MakeNewDoc(g);
|
||||
} // endif !Top
|
||||
|
||||
return RC_OK;
|
||||
Done = (rc == RC_OK);
|
||||
return rc;
|
||||
} // end of MakeDocument
|
||||
|
||||
#if 0
|
||||
|
Reference in New Issue
Block a user