mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
BUG#21490 - No warning issued for deprecated replication parameters
This patch deprecates the replication startup options in the configuration file and on the command line. The options deprecated include: MASTER_HOST, MASTER_USER, MASTER_PASSWORD, MASTER_PORT, MASTER_CONNECT_RETRY, MASTER_SSL, MASTER_SSL_CA, MASTER_SSL_CAPATH, MASTER_SSL_CERT, MASTER_SSL_KEY, and MASTER_SSL_CIPHER The code is designed to print the warning message once.
This commit is contained in:
@ -93,13 +93,16 @@ char* query_table_status(THD *thd,const char *db,const char *table_name);
|
||||
|
||||
#define WARN_DEPRECATED(Thd,Ver,Old,New) \
|
||||
do { \
|
||||
DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) >= 0); \
|
||||
DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) > 0); \
|
||||
if (Thd != NULL) \
|
||||
push_warning_printf(((THD *)Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \
|
||||
ER_WARN_DEPRECATED_SYNTAX, ER(ER_WARN_DEPRECATED_SYNTAX), \
|
||||
(Old), (Ver), (New)); \
|
||||
else \
|
||||
sql_print_warning("The syntax %s is deprecated and will be removed " \
|
||||
"in MySQL %s. Please use %s instead.", (Old), (Ver), (New)); \
|
||||
} while(0)
|
||||
|
||||
|
||||
extern CHARSET_INFO *system_charset_info, *files_charset_info ;
|
||||
extern CHARSET_INFO *national_charset_info, *table_alias_charset;
|
||||
|
||||
|
@ -361,6 +361,7 @@ my_bool opt_safe_user_create = 0, opt_no_mix_types = 0;
|
||||
my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0;
|
||||
my_bool opt_log_slave_updates= 0;
|
||||
my_bool opt_innodb;
|
||||
bool slave_warning_issued = false;
|
||||
|
||||
/*
|
||||
Legacy global handlerton. These will be removed (please do not add more).
|
||||
@ -7470,6 +7471,29 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
case (int) OPT_STANDALONE: /* Dummy option for NT */
|
||||
break;
|
||||
#endif
|
||||
/*
|
||||
The following change issues a deprecation warning if the slave
|
||||
configuration is specified either in the my.cnf file or on
|
||||
the command-line. See BUG#21490.
|
||||
*/
|
||||
case OPT_MASTER_HOST:
|
||||
case OPT_MASTER_USER:
|
||||
case OPT_MASTER_PASSWORD:
|
||||
case OPT_MASTER_PORT:
|
||||
case OPT_MASTER_CONNECT_RETRY:
|
||||
case OPT_MASTER_SSL:
|
||||
case OPT_MASTER_SSL_KEY:
|
||||
case OPT_MASTER_SSL_CERT:
|
||||
case OPT_MASTER_SSL_CAPATH:
|
||||
case OPT_MASTER_SSL_CIPHER:
|
||||
case OPT_MASTER_SSL_CA:
|
||||
if (!slave_warning_issued) //only show the warning once
|
||||
{
|
||||
slave_warning_issued = true;
|
||||
WARN_DEPRECATED(0, "5.2", "for replication startup options",
|
||||
"'CHANGE MASTER'");
|
||||
}
|
||||
break;
|
||||
case OPT_CONSOLE:
|
||||
if (opt_console)
|
||||
opt_error_log= 0; // Force logs to stdout
|
||||
|
Reference in New Issue
Block a user