summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
diff options
context:
space:
mode:
authorcbell/Chuck@mysql_cab_desk. <>2007-01-18 13:35:49 -0500
committercbell/Chuck@mysql_cab_desk. <>2007-01-18 13:35:49 -0500
commitfc0adebe0eb34e94eacc7a677a1d55b349131953 (patch)
tree9ea461a2cea740fc4e8ad9a2ae42fecd0c569d5e /sql/mysql_priv.h
parentc380de50efabf72976d63bcf2c2dcb8857b399bb (diff)
downloadmariadb-git-fc0adebe0eb34e94eacc7a677a1d55b349131953.tar.gz
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.
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index cad42320db4..06a02978994 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -91,6 +91,18 @@ char* query_table_status(THD *thd,const char *db,const char *table_name);
#define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1))
#define all_bits_set(A,B) ((A) & (B) != (B))
+#define WARN_DEPRECATED(Thd,Ver,Old,New) \
+ do { \
+ 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;