summaryrefslogtreecommitdiff
path: root/client/mysqldump.c
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2019-06-20 01:15:40 -0700
committerAnel Husakovic <anel@mariadb.org>2019-06-24 02:40:06 -0700
commit620f4f8af98666e2efb7e14fb2663ab85b52bc12 (patch)
tree3d15c0e695eb18ce8ebacaca604e4ef35928ca20 /client/mysqldump.c
parent68c15eee3f5d0078745837143bbbe223003b72f3 (diff)
downloadmariadb-git-620f4f8af98666e2efb7e14fb2663ab85b52bc12.tar.gz
MDEV-17429 mysqldump uses 10.3 options with pre-10.3 servers and breaks
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r--client/mysqldump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 10f9739d637..88cf4447f18 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -2524,7 +2524,9 @@ static uint dump_routines_for_db(char *db)
char db_cl_name[MY_CS_NAME_SIZE];
int db_cl_altered= FALSE;
-
+ // before 10.3 packages are not supported
+ uint upper_bound= mysql_get_server_version(mysql) >= 100300 ?
+ array_elements(routine_type) : 2;
DBUG_ENTER("dump_routines_for_db");
DBUG_PRINT("enter", ("db: '%s'", db));
@@ -2554,7 +2556,7 @@ static uint dump_routines_for_db(char *db)
fputs("\t<routines>\n", sql_file);
/* 0, retrieve and dump functions, 1, procedures, etc. */
- for (i= 0; i < array_elements(routine_type); i++)
+ for (i= 0; i < upper_bound; i++)
{
my_snprintf(query_buff, sizeof(query_buff),
"SHOW %s STATUS WHERE Db = '%s'",