diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-05-05 23:03:01 +0300 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-05-05 23:03:01 +0300 |
commit | 509e4990af4d99e9d3c790eabe1c1705ae910b55 (patch) | |
tree | 02d4ca9409711baef3ec163adc402f2c380df7c8 /storage/connect/tabxml.cpp | |
parent | 0cc811c633d1fe5290b10fa49fad0a4b889383fa (diff) | |
parent | 4f143a88bcb36e94e9edba8a3c5b4a350dcd9bf9 (diff) | |
download | mariadb-git-509e4990af4d99e9d3c790eabe1c1705ae910b55.tar.gz |
Merge branch bb-10.3-release into bb-10.4-release
Diffstat (limited to 'storage/connect/tabxml.cpp')
-rw-r--r-- | storage/connect/tabxml.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index e82e9b6823e..195a9418f93 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); |