diff options
author | Dmitry Lenev <dlenev@mysql.com> | 2010-03-01 19:48:39 +0300 |
---|---|---|
committer | Dmitry Lenev <dlenev@mysql.com> | 2010-03-01 19:48:39 +0300 |
commit | 5e09c42f2186da9531c07537afe3cb97558d9245 (patch) | |
tree | 157d5fe173905db6d224c6d19bd3e40c4fd83c79 /sql | |
parent | 629be0947e94f3307f772f66f4ea4eb002e3fe2a (diff) | |
parent | b71eb4192c961465872f226d71a5569b2334d369 (diff) | |
download | mariadb-git-5e09c42f2186da9531c07537afe3cb97558d9245.tar.gz |
Merged recent changes from mysql-next-mr-bugfixing
into mysql-next-4284.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sys_vars.cc | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index b7aa4007153..3de2fd0a985 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1305,6 +1305,17 @@ static Sys_var_ulong Sys_optimizer_prune_level( SESSION_VAR(optimizer_prune_level), CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, 1), DEFAULT(1), BLOCK_SIZE(1)); +/** Warns about deprecated value 63 */ +static bool fix_optimizer_search_depth(sys_var *self, THD *thd, + enum_var_type type) +{ + SV *sv= type == OPT_GLOBAL ? &global_system_variables : &thd->variables; + if (sv->optimizer_search_depth == MAX_TABLES+2) + WARN_DEPRECATED(thd, 6, 0, "optimizer-search-depth=63", + "a search depth less than 63"); + return false; +} + static Sys_var_ulong Sys_optimizer_search_depth( "optimizer_search_depth", "Maximum depth of search performed by the query optimizer. Values " @@ -1313,10 +1324,12 @@ static Sys_var_ulong Sys_optimizer_search_depth( "than the number of tables in a relation result in faster " "optimization, but may produce very bad query plans. If set to 0, " "the system will automatically pick a reasonable value; if set to " - "63, the optimizer will switch to the original find_best search" - "(used for testing/comparison)", + "63, the optimizer will switch to the original find_best search. " + "NOTE: The value 63 and its associated behaviour is deprecated", SESSION_VAR(optimizer_search_depth), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(0, MAX_TABLES+2), DEFAULT(MAX_TABLES+1), BLOCK_SIZE(1)); + VALID_RANGE(0, MAX_TABLES+2), DEFAULT(MAX_TABLES+1), BLOCK_SIZE(1), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(fix_optimizer_search_depth)); static const char *optimizer_switch_names[]= { |