Commit 14976fbe authored by Nisha Gopalakrishnan's avatar Nisha Gopalakrishnan

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.
parent e203951c
...@@ -217,7 +217,6 @@ uchar *sys_var::global_value_ptr(THD *thd, LEX_STRING *base) ...@@ -217,7 +217,6 @@ uchar *sys_var::global_value_ptr(THD *thd, LEX_STRING *base)
bool sys_var::check(THD *thd, set_var *var) bool sys_var::check(THD *thd, set_var *var)
{ {
do_deprecated_warning(thd);
if ((var->value && do_check(thd, var)) if ((var->value && do_check(thd, var))
|| (on_check && on_check(this, thd, var))) || (on_check && on_check(this, thd, var)))
{ {
...@@ -593,6 +592,7 @@ err: ...@@ -593,6 +592,7 @@ err:
int set_var::check(THD *thd) int set_var::check(THD *thd)
{ {
var->do_deprecated_warning(thd);
if (var->is_readonly()) if (var->is_readonly())
{ {
my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), var->name.str, "read only"); my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), var->name.str, "read only");
......
...@@ -143,6 +143,7 @@ public: ...@@ -143,6 +143,7 @@ public:
return (option.id != -1) && (m_parse_flag & parse_flags) && return (option.id != -1) && (m_parse_flag & parse_flags) &&
insert_dynamic(array, (uchar*)&option); insert_dynamic(array, (uchar*)&option);
} }
void do_deprecated_warning(THD *thd);
private: private:
virtual bool do_check(THD *thd, set_var *var) = 0; virtual bool do_check(THD *thd, set_var *var) = 0;
...@@ -156,7 +157,7 @@ private: ...@@ -156,7 +157,7 @@ private:
virtual void global_save_default(THD *thd, set_var *var) = 0; virtual void global_save_default(THD *thd, set_var *var) = 0;
virtual bool session_update(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; virtual bool global_update(THD *thd, set_var *var) = 0;
void do_deprecated_warning(THD *thd);
protected: protected:
/** /**
A pointer to a value of the variable for SHOW. A pointer to a value of the variable for SHOW.
......
/* 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 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 it under the terms of the GNU General Public License as published by
...@@ -1797,9 +1797,13 @@ static Sys_var_charptr Sys_socket( ...@@ -1797,9 +1797,13 @@ static Sys_var_charptr Sys_socket(
static Sys_var_ulong Sys_thread_concurrency( static Sys_var_ulong Sys_thread_concurrency(
"thread_concurrency", "thread_concurrency",
"Permits the application to give the threads system a hint for " "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), 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( static Sys_var_ulong Sys_thread_stack(
"thread_stack", "The stack size for each thread", "thread_stack", "The stack size for each thread",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment