BUG#16032946 - PLEASE GIVE A MESSAGE FOR "THREAD_CONCURRENCY DOESN'T

DO WHAT YOU EXPECT"

Fix info:
--------

Backport of the deprecation bug fix (WL#5265) for global variable
'THREAD_CONCURRENCY' from mysql-5.6 to mysql-5.5

Note: With this backport, certain additional deprecation warnings
      would be reported under error conditions while setting the
      global/session variables.
This commit is contained in:
Nisha Gopalakrishnan 2013-09-05 13:40:27 +05:30
parent 6a23a44495
commit 3f1802a4c9
3 changed files with 10 additions and 5 deletions

View file

@ -217,7 +217,6 @@ uchar *sys_var::global_value_ptr(THD *thd, LEX_STRING *base)
bool sys_var::check(THD *thd, set_var *var)
{
do_deprecated_warning(thd);
if ((var->value && do_check(thd, var))
|| (on_check && on_check(this, thd, var)))
{
@ -593,6 +592,7 @@ err:
int set_var::check(THD *thd)
{
var->do_deprecated_warning(thd);
if (var->is_readonly())
{
my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), var->name.str, "read only");

View file

@ -143,6 +143,7 @@ public:
return (option.id != -1) && (m_parse_flag & parse_flags) &&
insert_dynamic(array, (uchar*)&option);
}
void do_deprecated_warning(THD *thd);
private:
virtual bool do_check(THD *thd, set_var *var) = 0;
@ -156,7 +157,7 @@ private:
virtual void global_save_default(THD *thd, set_var *var) = 0;
virtual bool session_update(THD *thd, set_var *var) = 0;
virtual bool global_update(THD *thd, set_var *var) = 0;
void do_deprecated_warning(THD *thd);
protected:
/**
A pointer to a value of the variable for SHOW.

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2002, 2013, 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
@ -1797,9 +1797,13 @@ static Sys_var_charptr Sys_socket(
static Sys_var_ulong Sys_thread_concurrency(
"thread_concurrency",
"Permits the application to give the threads system a hint for "
"the desired number of threads that should be run at the same time",
"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),
VALID_RANGE(1, 512), DEFAULT(DEFAULT_CONCURRENCY), BLOCK_SIZE(1));
VALID_RANGE(1, 512), DEFAULT(DEFAULT_CONCURRENCY), BLOCK_SIZE(1),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0),
DEPRECATED(""));
static Sys_var_ulong Sys_thread_stack(
"thread_stack", "The stack size for each thread",