diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-05-04 14:49:31 +0300 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-05-04 14:49:31 +0300 |
commit | a8a925dd22ae00494cc9ffdc1ff68906106a408c (patch) | |
tree | a857c565a22ec7f6f41d3efa72053a726a346af2 /storage/connect/tabxml.cpp | |
parent | 2820f30dde3148df71e1d748ac705d98d60e0787 (diff) | |
parent | 72fa9dabadb4b0011f483ccbf1ef59e62d0ef1e0 (diff) | |
download | mariadb-git-a8a925dd22ae00494cc9ffdc1ff68906106a408c.tar.gz |
Merge branch bb-10.2-release into bb-10.3-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 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); |