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.
This commit is contained in:
Arun Kuruvila 2014-07-02 14:52:52 +05:30
parent 43268d20e7
commit cf50d1e6d6
4 changed files with 34 additions and 2 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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

View File

@ -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(""));