From e85006e6708800b3b3cdc6a40b43acc43880e075 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Tue, 16 Mar 2021 23:32:58 +0100 Subject: - Fix bug making REST table fail using CURL This when the HTTP contains & characters modified: storage/connect/tabbson.cpp modified: storage/connect/tabjson.cpp - Make stringfy option work on only one Json item modified: storage/connect/tabbson.cpp modified: storage/connect/tabbson.h modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h - Make Json/Bson DATE columns accept JSON date syntax modified: storage/connect/tabbson.cpp modified: storage/connect/tabjson.cpp - Fix bug making REST table default file not being erased when dropping the table modified: storage/connect/tabbson.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabrest.cpp modified: storage/connect/tabxml.cpp - Suppress CHAR(36) --> VARCHAR(36) when DEVELOPMENT This was fixed in MyClient modified: storage/connect/ha_connect.cc --- storage/connect/tabxml.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'storage/connect/tabxml.cpp') diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 6c9e9597cec..6065bb1b5d2 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -148,14 +148,21 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info) /* Open the input file. */ /*********************************************************************/ if (!(fn = GetStringTableOption(g, topt, "Filename", NULL))) { - strcpy(g->Message, MSG(MISSING_FNAME)); - return NULL; - } else { - lvl = GetIntegerTableOption(g, topt, "Level", GetDefaultDepth()); - lvl = GetIntegerTableOption(g, topt, "Depth", lvl); - lvl = (lvl < 0) ? 0 : (lvl > 16) ? 16 : lvl; + if (topt->http) // REST table can have default filename + fn = GetStringTableOption(g, topt, "Subtype", NULL); + + if (!fn) { + strcpy(g->Message, MSG(MISSING_FNAME)); + return NULL; + } else + topt->subtype = NULL; + } // endif fn + lvl = GetIntegerTableOption(g, topt, "Level", GetDefaultDepth()); + lvl = GetIntegerTableOption(g, topt, "Depth", lvl); + lvl = (lvl < 0) ? 0 : (lvl > 16) ? 16 : lvl; + if (trace(1)) htrc("File %s lvl=%d\n", topt->filename, lvl); -- cgit v1.2.1