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

- Fix bug returning pointer to a stack string

in JVALUE::GetString
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp

- Fix a compiler bug happening on some configuration and platforms
  in JSNX::CalculateArray
  modified:   storage/connect/jsonudf.cpp

- Set default Schema as current directory
  This fix several bugs like:
    Fail to make JSON catalog tables
    Fail to use zipped file made by a file LOAD
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
This commit is contained in:
Olivier Bertrand
2017-08-07 16:24:53 +02:00
parent f5b0993bbd
commit cdf00b8d92
6 changed files with 65 additions and 38 deletions

View File

@@ -1403,10 +1403,20 @@ double JVALUE::GetFloat(void)
/***********************************************************************/
/* Return the Value's String value. */
/***********************************************************************/
PSZ JVALUE::GetString(void)
PSZ JVALUE::GetString(PGLOBAL g)
{
char buf[32];
return (Value) ? Value->GetCharString(buf) : NULL;
char *p;
if (Value) {
char buf[32];
if ((p = Value->GetCharString(buf)) == buf)
p = PlugDup(g, buf);
} else
p = NULL;
return p;
} // end of GetString
/***********************************************************************/