Commit f6bb1c11 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-9077 - do not dump sys schema by default (MySQL bug#76735)

parent aa2ff620
...@@ -126,3 +126,13 @@ enum options_client ...@@ -126,3 +126,13 @@ enum options_client
Name of the performance schema database. Name of the performance schema database.
*/ */
#define PERFORMANCE_SCHEMA_DB_NAME "performance_schema" #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"
...@@ -5228,6 +5228,10 @@ static int dump_all_databases() ...@@ -5228,6 +5228,10 @@ static int dump_all_databases()
!my_strcasecmp(&my_charset_latin1, row[0], PERFORMANCE_SCHEMA_DB_NAME)) !my_strcasecmp(&my_charset_latin1, row[0], PERFORMANCE_SCHEMA_DB_NAME))
continue; 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 (include_database(row[0]))
if (dump_all_tables_in_db(row[0])) if (dump_all_tables_in_db(row[0]))
result=1; result=1;
...@@ -5252,6 +5256,10 @@ static int dump_all_databases() ...@@ -5252,6 +5256,10 @@ static int dump_all_databases()
!my_strcasecmp(&my_charset_latin1, row[0], PERFORMANCE_SCHEMA_DB_NAME)) !my_strcasecmp(&my_charset_latin1, row[0], PERFORMANCE_SCHEMA_DB_NAME))
continue; 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 (include_database(row[0]))
if (dump_all_views_in_db(row[0])) if (dump_all_views_in_db(row[0]))
result=1; result=1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment