diff options
author | Anel Husakovic <anel@mariadb.org> | 2019-06-20 01:15:40 -0700 |
---|---|---|
committer | Anel Husakovic <anel@mariadb.org> | 2019-06-24 02:40:06 -0700 |
commit | 620f4f8af98666e2efb7e14fb2663ab85b52bc12 (patch) | |
tree | 3d15c0e695eb18ce8ebacaca604e4ef35928ca20 /client/mysqldump.c | |
parent | 68c15eee3f5d0078745837143bbbe223003b72f3 (diff) | |
download | mariadb-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.c | 6 |
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'", |