mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix bug: Discovery of JSON table fails in DEBUG mode
when NO MONGO support. (tdb->Uri is uninitialized) modified: storage/connect/tabjson.cpp
This commit is contained in:
@@ -131,14 +131,12 @@ PQRYRES JSONColumns(PGLOBAL g, char *db, char *dsn, PTOS topt, bool info)
|
|||||||
tdp->Base = GetIntegerTableOption(g, topt, "Base", 0) ? 1 : 0;
|
tdp->Base = GetIntegerTableOption(g, topt, "Base", 0) ? 1 : 0;
|
||||||
tdp->Pretty = GetIntegerTableOption(g, topt, "Pretty", 2);
|
tdp->Pretty = GetIntegerTableOption(g, topt, "Pretty", 2);
|
||||||
tdp->Xcol = GetStringTableOption(g, topt, "Expand", NULL);
|
tdp->Xcol = GetStringTableOption(g, topt, "Expand", NULL);
|
||||||
|
tdp->Uri = (dsn && *dsn ? dsn : NULL);
|
||||||
|
|
||||||
if (trace)
|
if (trace)
|
||||||
htrc("File %s objname=%s pretty=%d lvl=%d\n",
|
htrc("File %s objname=%s pretty=%d lvl=%d\n",
|
||||||
tdp->Fn, tdp->Objname, tdp->Pretty, lvl);
|
tdp->Fn, tdp->Objname, tdp->Pretty, lvl);
|
||||||
|
|
||||||
if (dsn && *dsn)
|
|
||||||
tdp->Uri = dsn;
|
|
||||||
|
|
||||||
if (tdp->Uri) {
|
if (tdp->Uri) {
|
||||||
#if defined(MONGO_SUPPORT)
|
#if defined(MONGO_SUPPORT)
|
||||||
tdp->Collname = GetStringTableOption(g, topt, "Name", NULL);
|
tdp->Collname = GetStringTableOption(g, topt, "Name", NULL);
|
||||||
|
Reference in New Issue
Block a user