diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-10-29 13:03:08 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-10-29 13:03:08 +0100 |
commit | 0697d75cd052e809b05cc3e812f5e48209c04b4c (patch) | |
tree | 16524035d92e3d78dc27db00dbc30198aa84db78 /storage/connect/tabxml.cpp | |
parent | f6549e95448e5cce52336361f5a59d1edcdac46a (diff) | |
parent | c05e571e7d53ba11a3422490cff0d93e6691ea62 (diff) | |
download | mariadb-git-10.5-merge.tar.gz |
Merge commit 'c05e571e7d53ba11a3422490cff0d93e6691ea62' into HEAD10.5-merge
Diffstat (limited to 'storage/connect/tabxml.cpp')
-rw-r--r-- | storage/connect/tabxml.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index b6260eb66ee..81c19ff1a4f 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -3,7 +3,7 @@ /* ------------- */ /* Version 3.0 */ /* */ -/* Author Olivier BERTRAND 2007 - 2017 */ +/* Author Olivier BERTRAND 2007 - 2020 */ /* */ /* This program are the XML tables classes using MS-DOM or libxml2. */ /***********************************************************************/ @@ -62,6 +62,8 @@ extern "C" char version[]; #define TYPE_UNKNOWN 12 /* Must be greater than other types */ #define XLEN(M) sizeof(M) - strlen(M) - 1 /* To avoid overflow*/ +int GetDefaultDepth(void); + /***********************************************************************/ /* Class and structure used by XMLColumns. */ /***********************************************************************/ @@ -149,8 +151,9 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info) strcpy(g->Message, MSG(MISSING_FNAME)); return NULL; } else { - lvl = GetIntegerTableOption(g, topt, "Level", 0); - lvl = (lvl < 0) ? 0 : (lvl > 16) ? 16 : lvl; + lvl = GetIntegerTableOption(g, topt, "Level", GetDefaultDepth()); + lvl = GetIntegerTableOption(g, topt, "Depth", lvl); + lvl = (lvl < 0) ? 0 : (lvl > 16) ? 16 : lvl; } // endif fn if (trace(1)) |