summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-08-13 13:35:36 +0200
committerSergei Golubchik <sergii@pisem.net>2013-08-13 13:35:36 +0200
commitfcf87600a2d7ae03f7bda16c2f16cdec980d2a56 (patch)
tree0dd158f601c1b38f1b5e80eab137cd406c4499cb /sql
parenta6617eb341c9598f1247e8ddc5c66b7bec55129d (diff)
downloadmariadb-git-fcf87600a2d7ae03f7bda16c2f16cdec980d2a56.tar.gz
MDEV-4865 Change related to --log option/variable was merged partially
Complete the merge of magne.mahre@oracle.com-20101102115354-vxcaxminmzglzalk (WL#5185 Remove deprecated 5.1 features)
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc40
-rw-r--r--sql/mysqld.h3
-rw-r--r--sql/sql_plugin.cc9
-rw-r--r--sql/sql_yacc.yy18
-rw-r--r--sql/sys_vars.cc81
5 files changed, 2 insertions, 149 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index c3c64480616..1aee7efda30 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4669,13 +4669,6 @@ a file name for --log-bin-index option", opt_binlog_index_name);
}
plugins_are_initialized= TRUE; /* Don't separate from init function */
- have_csv= plugin_status(STRING_WITH_LEN("csv"),
- MYSQL_STORAGE_ENGINE_PLUGIN);
- have_ndbcluster= plugin_status(STRING_WITH_LEN("ndbcluster"),
- MYSQL_STORAGE_ENGINE_PLUGIN);
- have_partitioning= plugin_status(STRING_WITH_LEN("partition"),
- MYSQL_STORAGE_ENGINE_PLUGIN);
-
/* we do want to exit if there are any other unknown options */
if (remaining_argc > 1)
{
@@ -6759,14 +6752,6 @@ struct my_option my_long_options[]=
"Log slow statements executed by slave thread to the slow log if it is open.",
&opt_log_slow_slave_statements, &opt_log_slow_slave_statements,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"log-slow-queries", OPT_SLOW_QUERY_LOG,
- "Enable logging of slow queries (longer than --long-query-time) to log file "
- "or table. Optional argument is a file name for the slow log. If not given, "
- "'log-basename'-slow.log will be used. Use --log-output=TABLE if you want "
- "to have the log in the table mysql.slow_log. "
- "Deprecated option, use --slow-query-log/--slow-query-log-file instead.",
- &opt_slow_logname, &opt_slow_logname, 0, GET_STR_ALLOC, OPT_ARG,
- 0, 0, 0, 0, 0, 0},
{"log-tc", 0,
"Path to transaction coordinator log (used for transactions that affect "
"more than one storage engine, when binary log is disabled).",
@@ -6795,10 +6780,6 @@ struct my_option my_long_options[]=
#endif /* HAVE_REPLICATION */
{"memlock", 0, "Lock mysqld in memory.", &locked_in_memory,
&locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"one-thread", OPT_ONE_THREAD,
- "(Deprecated): Only use one thread (for debugging under Linux). Use "
- "thread-handling=no-threads instead.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"old-style-user-limits", 0,
"Enable old-style user limits (before 5.0.3, user resources were counted "
"per each user+host vs. per account).",
@@ -6886,10 +6867,6 @@ struct my_option my_long_options[]=
{"skip-slave-start", 0,
"If set, slave is not autostarted.", &opt_skip_slave_start,
&opt_skip_slave_start, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"skip-thread-priority", OPT_SKIP_PRIOR,
- "Don't give threads different priorities. This option is deprecated "
- "because it has no effect; the implied behavior is already the default.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
{"slow-start-timeout", 0,
"Maximum number of milliseconds that the service control manager should wait "
@@ -8092,10 +8069,6 @@ mysqld_get_one_option(int optid,
if (default_collation_name == compiled_default_collation_name)
default_collation_name= 0;
break;
- case 'l':
- WARN_DEPRECATED(NULL, 10, 1, "--log", "'--general-log'/'--general-log-file'");
- opt_log=1;
- break;
case 'h':
strmake_buf(mysql_real_data_home, argument);
/* Correct pointer set by my_getopt (for embedded library) */
@@ -8257,10 +8230,6 @@ mysqld_get_one_option(int optid,
break;
}
#endif /* HAVE_REPLICATION */
- case (int) OPT_SLOW_QUERY_LOG:
- WARN_DEPRECATED(NULL, 10, 1, "--log-slow-queries", "'--slow-query-log'/'--slow-query-log-file'");
- opt_slow_log= 1;
- break;
case (int) OPT_SAFE:
opt_specialflag|= SPECIAL_SAFE_MODE | SPECIAL_NO_NEW_FUNC;
delay_key_write_options= (uint) DELAY_KEY_WRITE_NONE;
@@ -8272,12 +8241,6 @@ mysqld_get_one_option(int optid,
sql_print_warning("The syntax '--safe-mode' is deprecated and will be "
"removed in a future release.");
break;
- case (int) OPT_SKIP_PRIOR:
- opt_specialflag|= SPECIAL_NO_PRIOR;
- sql_print_warning("The --skip-thread-priority startup option is deprecated "
- "and will be removed in MySQL 11.0. This option has no effect "
- "as the implied behavior is already the default.");
- break;
case (int) OPT_SKIP_HOST_CACHE:
opt_specialflag|= SPECIAL_NO_HOST_CACHE;
break;
@@ -8299,9 +8262,6 @@ mysqld_get_one_option(int optid,
server_id_supplied = 1;
::server_id= global_system_variables.server_id;
break;
- case OPT_ONE_THREAD:
- thread_handling= SCHEDULER_NO_THREADS;
- break;
case OPT_LOWER_CASE_TABLE_NAMES:
lower_case_table_names_used= 1;
break;
diff --git a/sql/mysqld.h b/sql/mysqld.h
index 1f210edd354..78d49e865d8 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -541,7 +541,6 @@ enum options_mysqld
OPT_MAX_LONG_DATA_SIZE,
OPT_PLUGIN_LOAD,
OPT_PLUGIN_LOAD_ADD,
- OPT_ONE_THREAD,
OPT_PFS_INSTRUMENT,
OPT_POOL_OF_THREADS,
OPT_REPLICATE_DO_DB,
@@ -555,11 +554,9 @@ enum options_mysqld
OPT_SERVER_ID,
OPT_SKIP_HOST_CACHE,
OPT_SKIP_LOCK,
- OPT_SKIP_PRIOR,
OPT_SKIP_RESOLVE,
OPT_SKIP_STACK_TRACE,
OPT_SKIP_SYMLINKS,
- OPT_SLOW_QUERY_LOG,
OPT_SSL_CA,
OPT_SSL_CAPATH,
OPT_SSL_CERT,
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 941587150f3..6d2a33450de 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -1175,10 +1175,6 @@ static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check)
}
plugin->state= PLUGIN_IS_UNINITIALIZED;
- /* maintain the obsolete @@have_innodb variable */
- if (!my_strcasecmp(&my_charset_latin1, plugin->name.str, "InnoDB"))
- have_innodb= SHOW_OPTION_DISABLED;
-
/*
We do the check here because NDB has a worker THD which doesn't
exit until NDB is shut down.
@@ -1403,11 +1399,6 @@ err:
mysql_mutex_lock(&LOCK_plugin);
plugin->state= state;
- /* maintain the obsolete @@have_innodb variable */
- if (!my_strcasecmp(&my_charset_latin1, plugin->name.str, "InnoDB"))
- have_innodb= state & PLUGIN_IS_READY ? SHOW_OPTION_YES
- : SHOW_OPTION_DISABLED;
-
DBUG_RETURN(ret);
}
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index b2b269da4f2..50b30d94f53 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -7682,10 +7682,6 @@ opt_to:
| AS {}
;
-/*
- SLAVE START and SLAVE STOP are deprecated. We keep them for compatibility.
-*/
-
slave:
START_SYM SLAVE optional_connection_name slave_thread_opts
{
@@ -7717,20 +7713,6 @@ slave:
lex->type = 0;
/* If you change this code don't forget to update SLAVE STOP too */
}
- | SLAVE optional_connection_name START_SYM slave_thread_opts
- {
- LEX *lex=Lex;
- lex->sql_command = SQLCOM_SLAVE_START;
- lex->type = 0;
- }
- slave_until
- {}
- | SLAVE optional_connection_name STOP_SYM slave_thread_opts
- {
- LEX *lex=Lex;
- lex->sql_command = SQLCOM_SLAVE_STOP;
- lex->type = 0;
- }
;
start:
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 1dfdc37a989..bb96d69ebc5 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -1175,15 +1175,6 @@ static Sys_var_mybool Sys_low_priority_updates(
DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_low_prio_updates));
-#ifndef TO_BE_DELETED /* Alias for the low_priority_updates */
-static Sys_var_mybool Sys_sql_low_priority_updates(
- "sql_low_priority_updates",
- "INSERT/DELETE/UPDATE has lower priority than selects",
- SESSION_VAR(low_priority_updates), NO_CMD_LINE,
- DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
- ON_UPDATE(fix_low_prio_updates));
-#endif
-
static Sys_var_mybool Sys_lower_case_file_system(
"lower_case_file_system",
"Case sensitivity of file names on the file system where the "
@@ -1626,13 +1617,6 @@ static Sys_var_ulong Sys_max_length_for_sort_data(
SESSION_VAR(max_length_for_sort_data), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(4, 8192*1024L), DEFAULT(1024), BLOCK_SIZE(1));
-static Sys_var_harows Sys_sql_max_join_size(
- "sql_max_join_size", "Alias for max_join_size",
- SESSION_VAR(max_join_size), NO_CMD_LINE,
- VALID_RANGE(1, HA_POS_ERROR), DEFAULT(HA_POS_ERROR), BLOCK_SIZE(1),
- NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
- ON_UPDATE(fix_max_join_size), DEPRECATED("'@@max_join_size'"));
-
static Sys_var_ulong Sys_max_long_data_size(
"max_long_data_size",
"The maximum BLOB length to send to server from "
@@ -2901,27 +2885,6 @@ static Sys_var_ulong Sys_net_wait_timeout(
VALID_RANGE(1, IF_WIN(INT_MAX32/1000, LONG_TIMEOUT)),
DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1));
-/** propagates changes to the relevant flag of @@optimizer_switch */
-static bool fix_engine_condition_pushdown(sys_var *self, THD *thd,
- enum_var_type type)
-{
- SV *sv= (type == OPT_GLOBAL) ? &global_system_variables : &thd->variables;
- if (sv->engine_condition_pushdown)
- sv->optimizer_switch|= OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN;
- else
- sv->optimizer_switch&= ~OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN;
- return false;
-}
-static Sys_var_mybool Sys_engine_condition_pushdown(
- "engine_condition_pushdown",
- "Push supported query conditions to the storage engine."
- " Deprecated, use --optimizer-switch instead.",
- SESSION_VAR(engine_condition_pushdown),
- CMD_LINE(OPT_ARG, OPT_ENGINE_CONDITION_PUSHDOWN),
- DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
- ON_UPDATE(fix_engine_condition_pushdown),
- DEPRECATED("'@@optimizer_switch'"));
-
static Sys_var_plugin Sys_default_storage_engine(
"default_storage_engine", "The default storage engine for new tables",
SESSION_VAR(table_plugin), NO_CMD_LINE,
@@ -3041,12 +3004,6 @@ static Sys_var_mybool Sys_big_tables(
"temporary sets on file (Solves most 'table full' errors)",
SESSION_VAR(big_tables), CMD_LINE(OPT_ARG), DEFAULT(FALSE));
-#ifndef TO_BE_DELETED /* Alias for big_tables */
-static Sys_var_mybool Sys_sql_big_tables(
- "sql_big_tables", "alias for big_tables",
- SESSION_VAR(big_tables), NO_CMD_LINE, DEFAULT(FALSE));
-#endif
-
static Sys_var_bit Sys_big_selects(
"sql_big_selects", "sql_big_selects",
SESSION_VAR(option_bits), NO_CMD_LINE, OPTION_BIG_SELECTS,
@@ -3537,25 +3494,6 @@ static Sys_var_charptr Sys_slow_log_path(
IN_FS_CHARSET, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
ON_CHECK(check_log_path), ON_UPDATE(fix_slow_log_file));
-/// @todo deprecate these four legacy have_PLUGIN variables and use I_S instead
-export SHOW_COMP_OPTION have_csv, have_innodb= SHOW_OPTION_DISABLED;
-export SHOW_COMP_OPTION have_ndbcluster, have_partitioning;
-static Sys_var_have Sys_have_csv(
- "have_csv", "have_csv",
- READ_ONLY GLOBAL_VAR(have_csv), NO_CMD_LINE);
-
-static Sys_var_have Sys_have_innodb(
- "have_innodb", "have_innodb",
- READ_ONLY GLOBAL_VAR(have_innodb), NO_CMD_LINE);
-
-static Sys_var_have Sys_have_ndbcluster(
- "have_ndbcluster", "have_ndbcluster",
- READ_ONLY GLOBAL_VAR(have_ndbcluster), NO_CMD_LINE);
-
-static Sys_var_have Sys_have_partition_db(
- "have_partitioning", "have_partitioning",
- READ_ONLY GLOBAL_VAR(have_partitioning), NO_CMD_LINE);
-
static Sys_var_have Sys_have_compress(
"have_compress", "have_compress",
READ_ONLY GLOBAL_VAR(have_compress), NO_CMD_LINE);
@@ -3605,13 +3543,6 @@ static Sys_var_mybool Sys_general_log(
DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_log_state));
-// Synonym of "general_log" for consistency with SHOW VARIABLES output
-static Sys_var_mybool Sys_log(
- "log", "Alias for --general-log. Deprecated",
- GLOBAL_VAR(opt_log), NO_CMD_LINE,
- DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
- ON_UPDATE(fix_log_state), DEPRECATED("'@@general_log'"));
-
static Sys_var_mybool Sys_slow_query_log(
"slow_query_log",
"Log slow queries to a table or log file. Defaults logging to a file "
@@ -3621,27 +3552,19 @@ static Sys_var_mybool Sys_slow_query_log(
DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_log_state));
-/* Synonym of "slow_query_log" for consistency with SHOW VARIABLES output */
-static Sys_var_mybool Sys_log_slow(
- "log_slow_queries",
- "Alias for --slow-query-log. Deprecated",
- GLOBAL_VAR(opt_slow_log), NO_CMD_LINE,
- DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
- ON_UPDATE(fix_log_state), DEPRECATED("'@@slow_query_log'"));
-
static bool fix_log_state(sys_var *self, THD *thd, enum_var_type type)
{
bool res;
my_bool *UNINIT_VAR(newvalptr), newval, UNINIT_VAR(oldval);
uint UNINIT_VAR(log_type);
- if (self == &Sys_general_log || self == &Sys_log)
+ if (self == &Sys_general_log)
{
newvalptr= &opt_log;
oldval= logger.get_log_file_handler()->is_open();
log_type= QUERY_LOG_GENERAL;
}
- else if (self == &Sys_slow_query_log || self == &Sys_log_slow)
+ else if (self == &Sys_slow_query_log)
{
newvalptr= &opt_slow_log;
oldval= logger.get_slow_log_file_handler()->is_open();