diff options
author | Arun Kuruvila <arun.kuruvila@oracle.com> | 2014-07-02 14:52:52 +0530 |
---|---|---|
committer | Arun Kuruvila <arun.kuruvila@oracle.com> | 2014-07-02 14:52:52 +0530 |
commit | cf50d1e6d68669b4b449ca04bd166abc9faa1f37 (patch) | |
tree | b886a6cde80fe45355dc82e6a89234a023d40210 /sql | |
parent | 43268d20e747f4e4194ea26f7fecc434e0ebf550 (diff) | |
download | mariadb-git-cf50d1e6d68669b4b449ca04bd166abc9faa1f37.tar.gz |
Bug#17873011 NO DEPRECATION WARNING FOR THREAD_CONCURRENCY
Description:
THREAD_CONCURRENCY is deprecated and there is no
deprecation warning message while setting this variable
while starting the server.
Analysis:
This variable is specific to Solaris 8 and earlier systems
and is ignored on all other platforms. But since many
customers, who uses other than Solaris, still has this
variable in their configuration file, it is important to
have a deprecation warning.
Fix:
THREAD_CONCURRENCY deprecation warning message is added.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 3 | ||||
-rw-r--r-- | sql/mysqld.h | 1 | ||||
-rw-r--r-- | sql/sql_priv.h | 29 | ||||
-rw-r--r-- | sql/sys_vars.cc | 3 |
4 files changed, 34 insertions, 2 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 1489e3cdc31..f8f50313dad 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7060,6 +7060,9 @@ mysqld_get_one_option(int optid, test_flags= argument ? (uint) atoi(argument) : 0; opt_endinfo=1; break; + case OPT_THREAD_CONCURRENCY: + WARN_DEPRECATED_NO_REPLACEMENT(NULL, "THREAD_CONCURRENCY"); + break; case (int) OPT_ISAM_LOG: opt_myisam_log=1; break; diff --git a/sql/mysqld.h b/sql/mysqld.h index bd93264d50d..655fb93df73 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -411,6 +411,7 @@ enum options_mysqld OPT_SSL_CERT, OPT_SSL_CIPHER, OPT_SSL_KEY, + OPT_THREAD_CONCURRENCY, OPT_UPDATE_LOG, OPT_WANT_CORE, OPT_ENGINE_CONDITION_PUSHDOWN, diff --git a/sql/sql_priv.h b/sql/sql_priv.h index 970b921d6e6..523220b3c03 100644 --- a/sql/sql_priv.h +++ b/sql/sql_priv.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -59,6 +59,33 @@ (Old), (New)); \ } while(0) + +/* + Generates a warning that a feature is deprecated and there is no replacement. + + Using it as + + WARN_DEPRECATED_NO_REPLACEMENT(thd, "BAD"); + + Will result in a warning + + "'BAD' is deprecated and will be removed in a future release." + + Note that in macro arguments BAD is not quoted. +*/ + +#define WARN_DEPRECATED_NO_REPLACEMENT(Thd,Old) \ + do { \ + if (((THD *) Thd) != NULL) \ + push_warning_printf(((THD *) Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \ + ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT, \ + ER(ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT), \ + (Old)); \ + else \ + sql_print_warning("'%s' is deprecated and will be removed " \ + "in a future release.", (Old)); \ + } while(0) + /*************************************************************************/ #endif diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index f8b2c022ba5..3cb72480341 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1800,7 +1800,8 @@ static Sys_var_ulong Sys_thread_concurrency( "the desired number of threads that should be run at the same time." "This variable has no effect, and is deprecated. " "It will be removed in a future release.", - READ_ONLY GLOBAL_VAR(concurrency), CMD_LINE(REQUIRED_ARG), + READ_ONLY GLOBAL_VAR(concurrency), + CMD_LINE(REQUIRED_ARG, OPT_THREAD_CONCURRENCY), VALID_RANGE(1, 512), DEFAULT(DEFAULT_CONCURRENCY), BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), DEPRECATED("")); |