summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-23 17:13:36 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-23 17:13:36 -0300
commitdd14fa18afab0477bbc833b7f02f88fb977e79ae (patch)
treead51351f695978140f847012d093d17a18062b38 /sql
parent9fd9857e0bd02932543c03495599b19ea081031c (diff)
downloadmariadb-git-dd14fa18afab0477bbc833b7f02f88fb977e79ae.tar.gz
WL#5498: Remove dead and unused source code
Remove unused variables.
Diffstat (limited to 'sql')
-rw-r--r--sql/field.h1
-rw-r--r--sql/item_geofunc.cc2
-rw-r--r--sql/log.h1
-rw-r--r--sql/mysqld.cc17
-rw-r--r--sql/mysqld.h9
-rw-r--r--sql/repl_failsafe.cc3
-rw-r--r--sql/repl_failsafe.h2
-rw-r--r--sql/set_var.h1
-rw-r--r--sql/slave.cc1
-rw-r--r--sql/sql_lex.cc1
-rw-r--r--sql/sql_lex.h2
-rw-r--r--sql/sql_priv.h2
-rw-r--r--sql/sys_vars.cc2
13 files changed, 8 insertions, 36 deletions
diff --git a/sql/field.h b/sql/field.h
index 46d8a2aa6d9..53d15c63494 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -32,7 +32,6 @@
#include "sql_error.h" /* MYSQL_ERROR */
#define DATETIME_DEC 6
-const uint32 max_field_size= (uint32) 4294967295U;
class Send_field;
class Protocol;
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index e046087b16a..d734b55a970 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -49,7 +49,7 @@ void Item_geometry_func::fix_length_and_dec()
{
collation.set(&my_charset_bin);
decimals=0;
- max_length= max_field_size;
+ max_length= (uint32) 4294967295U;
maybe_null= 1;
}
diff --git a/sql/log.h b/sql/log.h
index 4a58c3081d8..6e87b6cbade 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -637,7 +637,6 @@ enum enum_binlog_format {
BINLOG_FORMAT_ROW= 2, ///< row-based
BINLOG_FORMAT_UNSPEC=3 ///< thd_binlog_format() returns it when binlog is closed
};
-extern TYPELIB binlog_format_typelib;
int query_error_code(THD *thd, bool not_killed);
uint purge_log_get_error_code(int res);
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 1a44115d893..7ce27f4ba4f 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -294,12 +294,6 @@ arg_cmp_func Arg_comparator::comparator_matrix[5][2] =
{&Arg_comparator::compare_row, &Arg_comparator::compare_e_row},
{&Arg_comparator::compare_decimal, &Arg_comparator::compare_e_decimal}};
-const char *log_output_names[] = { "NONE", "FILE", "TABLE", NullS};
-static const unsigned int log_output_names_len[]= { 4, 4, 5, 0 };
-TYPELIB log_output_typelib= {array_elements(log_output_names)-1,"",
- log_output_names,
- (unsigned int *) log_output_names_len};
-
/* static variables */
#ifdef HAVE_PSI_INTERFACE
@@ -395,8 +389,8 @@ my_bool opt_skip_slave_start = 0; ///< If set, slave is not autostarted
my_bool opt_reckless_slave = 0;
my_bool opt_enable_named_pipe= 0;
my_bool opt_local_infile, opt_slave_compressed_protocol;
-my_bool opt_safe_user_create = 0, opt_no_mix_types = 0;
-my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0;
+my_bool opt_safe_user_create = 0;
+my_bool opt_show_slave_auth_info;
my_bool opt_log_slave_updates= 0;
char *opt_slave_skip_errors;
@@ -440,9 +434,6 @@ my_bool sp_automatic_privileges= 1;
ulong opt_binlog_rows_event_max_size;
const char *binlog_format_names[]= {"MIXED", "STATEMENT", "ROW", NullS};
-TYPELIB binlog_format_typelib=
- { array_elements(binlog_format_names) - 1, "",
- binlog_format_names, NULL };
#ifdef HAVE_INITGROUPS
static bool calling_initgroups= FALSE; /**< Used in SIGSEGV handler. */
#endif
@@ -458,7 +449,7 @@ ulong thread_created;
ulong back_log, connect_timeout, concurrency, server_id;
ulong table_cache_size, table_def_size;
ulong what_to_log;
-ulong query_buff_size, slow_launch_time, slave_open_temp_tables;
+ulong slow_launch_time, slave_open_temp_tables;
ulong open_files_limit, max_binlog_size, max_relay_log_size;
ulong slave_trans_retries;
uint slave_net_timeout;
@@ -547,7 +538,6 @@ char mysql_real_data_home[FN_REFLEN],
mysql_charsets_dir[FN_REFLEN],
*opt_init_file, *opt_tc_log_file;
char *lc_messages_dir_ptr, *log_error_file_ptr;
-char err_shared_dir[FN_REFLEN];
char mysql_unpacked_real_data_home[FN_REFLEN];
int mysql_unpacked_real_data_home_len;
uint mysql_real_data_home_len, mysql_data_home_len= 1;
@@ -581,7 +571,6 @@ Le_creator le_creator;
MYSQL_FILE *bootstrap_file;
int bootstrap_error;
-FILE *stderror_file=0;
I_List<THD> threads;
Rpl_filter* rpl_filter;
diff --git a/sql/mysqld.h b/sql/mysqld.h
index e14cd15ceb8..626c2d116f5 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -78,9 +78,6 @@ extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *files_charset_info ;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *national_charset_info;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *table_alias_charset;
-extern TYPELIB log_output_typelib;
-extern const char *log_output_names[];
-
/**
Character set of the buildin error messages loaded from errmsg.sys.
*/
@@ -105,7 +102,7 @@ extern bool volatile abort_loop;
extern bool in_bootstrap;
extern uint volatile thread_count, global_read_lock;
extern uint connection_count;
-extern my_bool opt_sql_bin_update, opt_safe_user_create, opt_no_mix_types;
+extern my_bool opt_safe_user_create;
extern my_bool opt_safe_show_db, opt_local_infile, opt_myisam_use_mmap;
extern my_bool opt_slave_compressed_protocol, use_temp_pool;
extern uint slave_exec_mode_options;
@@ -173,7 +170,6 @@ extern ulong slave_trans_retries;
extern uint slave_net_timeout;
extern uint max_user_connections;
extern ulong what_to_log,flush_time;
-extern ulong query_buff_size;
extern ulong max_prepared_stmt_count, prepared_stmt_count;
extern ulong binlog_cache_size, open_files_limit;
extern ulonglong max_binlog_cache_size;
@@ -210,9 +206,7 @@ extern MYSQL_FILE *bootstrap_file;
extern my_bool old_mode;
extern LEX_STRING opt_init_connect, opt_init_slave;
extern int bootstrap_error;
-extern FILE *stderror_file;
extern I_List<THD> threads;
-extern char err_shared_dir[];
extern scheduler_functions thread_scheduler;
extern TYPELIB thread_handling_typelib;
extern my_decimal decimal_zero;
@@ -313,7 +307,6 @@ extern MYSQL_PLUGIN_IMPORT char mysql_real_data_home[];
extern char mysql_unpacked_real_data_home[];
extern MYSQL_PLUGIN_IMPORT struct system_variables global_system_variables;
extern char default_logfile_name[FN_REFLEN];
-extern char err_shared_dir[];
#define mysql_tmpdir (my_tmpdir(&mysql_tmpdir_list))
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index 18a5303bf96..47eb2f7031d 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -55,9 +55,6 @@ const char* rpl_status_type[]=
"AUTH_MASTER","IDLE_SLAVE","ACTIVE_SLAVE","LOST_SOLDIER","TROOP_SOLDIER",
"RECOVERY_CAPTAIN","NULL",NullS
};
-TYPELIB rpl_status_typelib= {array_elements(rpl_status_type)-1,"",
- rpl_status_type, NULL};
-
static Slave_log_event* find_slave_event(IO_CACHE* log,
const char* log_file_name,
diff --git a/sql/repl_failsafe.h b/sql/repl_failsafe.h
index 94b151aaee7..c6d00de47cb 100644
--- a/sql/repl_failsafe.h
+++ b/sql/repl_failsafe.h
@@ -30,7 +30,7 @@ extern RPL_STATUS rpl_status;
extern mysql_mutex_t LOCK_rpl_status;
extern mysql_cond_t COND_rpl_status;
-extern TYPELIB rpl_role_typelib, rpl_status_typelib;
+extern TYPELIB rpl_role_typelib;
extern const char* rpl_role_type[], *rpl_status_type[];
pthread_handler_t handle_failsafe_rpl(void *arg);
diff --git a/sql/set_var.h b/sql/set_var.h
index 1b415567659..5f1f889c4ce 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -169,7 +169,6 @@ protected:
{ return ((uchar*)&global_system_variables) + offset; }
};
-#include "log.h" /* binlog_format_typelib */
#include "sql_plugin.h" /* SHOW_HA_ROWS, SHOW_MY_BOOL */
/****************************************************************************
diff --git a/sql/slave.cc b/sql/slave.cc
index dc0f7286d5c..25860138cf2 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -83,7 +83,6 @@ ulonglong relay_log_space_limit = 0;
*/
int disconnect_slave_event_count = 0, abort_slave_event_count = 0;
-int events_till_abort = -1;
static pthread_key(Master_info*, RPL_MASTER_INFO);
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index aefddc0b6a5..568640b574a 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -41,7 +41,6 @@ sys_var *trg_new_row_fake_var= (sys_var*) 0x01;
LEX_STRING constant for null-string to be used in parser and other places.
*/
const LEX_STRING null_lex_str= {NULL, 0};
-const LEX_STRING empty_lex_str= { (char*) "", 0 };
/**
@note The order of the elements of this array must correspond to
the order of elements in enum_binlog_stmt_unsafe.
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index b8bf3b220c9..ed521e4791f 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -995,8 +995,6 @@ enum xa_option_words {XA_NONE, XA_JOIN, XA_RESUME, XA_ONE_PHASE,
XA_SUSPEND, XA_FOR_MIGRATE};
extern const LEX_STRING null_lex_str;
-extern const LEX_STRING empty_lex_str;
-
class Sroutine_hash_entry;
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index 604890ffbe5..7067ca084e2 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -59,8 +59,6 @@
(Old), (New)); \
} while(0)
-extern char err_shared_dir[];
-
/*************************************************************************/
#endif
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 6e95961ebb0..37a87687d48 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -2866,6 +2866,8 @@ static bool fix_log_output(sys_var *self, THD *thd, enum_var_type type)
return false;
}
+static const char *log_output_names[] = { "NONE", "FILE", "TABLE", NULL};
+
static Sys_var_set Sys_log_output(
"log_output", "Syntax: log-output=value[,value...], "
"where \"value\" could be TABLE, FILE or NONE",