diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2021-03-03 10:34:28 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2021-03-18 08:02:48 +0100 |
commit | f6bb1c117ec7bb22a3bf48fece0196817cda3b26 (patch) | |
tree | 5f571e54adbb5bbd40c40b355c8ff9d338da0271 /client | |
parent | aa2ff62082c4eb09b1d505af0d0327278c9f7d08 (diff) | |
download | mariadb-git-f6bb1c117ec7bb22a3bf48fece0196817cda3b26.tar.gz |
MDEV-9077 - do not dump sys schema by default (MySQL bug#76735)
Diffstat (limited to 'client')
-rw-r--r-- | client/client_priv.h | 10 | ||||
-rw-r--r-- | client/mysqldump.c | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/client/client_priv.h b/client/client_priv.h index 0f2cec47a08..64818d2ab8d 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -126,3 +126,13 @@ enum options_client Name of the performance schema database. */ #define PERFORMANCE_SCHEMA_DB_NAME "performance_schema" + +/** + First mariadb version supporting the sys schema. +*/ +#define FIRST_SYS_SCHEMA_VERSION 100600 + +/** + Name of the sys schema database. +*/ +#define SYS_SCHEMA_DB_NAME "sys" diff --git a/client/mysqldump.c b/client/mysqldump.c index 2aec9265921..0da44ccd399 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -5228,6 +5228,10 @@ static int dump_all_databases() !my_strcasecmp(&my_charset_latin1, row[0], PERFORMANCE_SCHEMA_DB_NAME)) continue; + if (mysql_get_server_version(mysql) >= FIRST_SYS_SCHEMA_VERSION && + !my_strcasecmp(&my_charset_latin1, row[0], SYS_SCHEMA_DB_NAME)) + continue; + if (include_database(row[0])) if (dump_all_tables_in_db(row[0])) result=1; @@ -5252,6 +5256,10 @@ static int dump_all_databases() !my_strcasecmp(&my_charset_latin1, row[0], PERFORMANCE_SCHEMA_DB_NAME)) continue; + if (mysql_get_server_version(mysql) >= FIRST_SYS_SCHEMA_VERSION && + !my_strcasecmp(&my_charset_latin1, row[0], SYS_SCHEMA_DB_NAME)) + continue; + if (include_database(row[0])) if (dump_all_views_in_db(row[0])) result=1; |