summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/set_var.cc2
-rw-r--r--sql/set_var.h3
-rw-r--r--sql/sys_vars.cc10
3 files changed, 10 insertions, 5 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 75387b974f1..82ea8298a66 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -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");
diff --git a/sql/set_var.h b/sql/set_var.h
index 01e3be11621..60164ba0363 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -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.
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 1d0f9691629..63f478be5f0 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -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",