# At a local mysql-trunk-bugfixing repository of davi
3132 Davi Arnaut 2010-07-19
WL#5498: Remove dead and unused source code
Remove unused variables.
modified:
include/lf.h
include/myisam.h
libmysql/libmysql.c
mysys/lf_hash.c
sql/field.h
sql/item_geofunc.cc
sql/log.h
sql/mysqld.cc
sql/mysqld.h
sql/repl_failsafe.cc
sql/repl_failsafe.h
sql/set_var.h
sql/slave.cc
sql/sql_lex.cc
sql/sql_lex.h
sql/sql_priv.h
sql/sys_vars.cc
storage/myisam/mi_static.c
storage/perfschema/pfs_events_waits.cc
=== modified file 'include/lf.h'
--- a/include/lf.h 2010-07-08 21:20:08 +0000
+++ b/include/lf.h 2010-07-20 02:27:11 +0000
@@ -222,8 +222,7 @@ C_MODE_START
#define LF_HASH_UNIQUE 1
-/* lf_hash overhead per element (that is, sizeof(LF_SLIST) */
-extern const int LF_HASH_OVERHEAD;
+/* lf_hash overhead per element is sizeof(LF_SLIST). */
typedef struct {
LF_DYNARRAY array; /* hash itself */
=== modified file 'include/myisam.h'
--- a/include/myisam.h 2010-06-28 20:32:09 +0000
+++ b/include/myisam.h 2010-07-20 02:27:11 +0000
@@ -252,7 +252,7 @@ extern ulong myisam_block_size;
extern uint myisam_concurrent_insert;
extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user;
extern my_off_t myisam_max_temp_length;
-extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;
+extern ulong myisam_data_pointer_size;
/* usually used to check if a symlink points into the mysql data home */
/* which is normally forbidden */
=== modified file 'libmysql/libmysql.c'
--- a/libmysql/libmysql.c 2010-07-15 13:47:50 +0000
+++ b/libmysql/libmysql.c 2010-07-20 02:27:11 +0000
@@ -214,13 +214,6 @@ void STDCALL mysql_server_end()
}
mysql_client_init= org_my_init_done= 0;
-#ifdef EMBEDDED_SERVER
- if (stderror_file)
- {
- fclose(stderror_file);
- stderror_file= 0;
- }
-#endif
}
static MYSQL_PARAMETERS mysql_internal_parameters=
=== modified file 'mysys/lf_hash.c'
--- a/mysys/lf_hash.c 2010-07-08 21:20:08 +0000
+++ b/mysys/lf_hash.c 2010-07-20 02:27:11 +0000
@@ -41,8 +41,6 @@ typedef struct {
*/
} LF_SLIST;
-const int LF_HASH_OVERHEAD= sizeof(LF_SLIST);
-
/*
a structure to pass the context (pointers two the three successive elements
in a list) from lfind to linsert/ldelete
=== modified file 'sql/field.h'
--- a/sql/field.h 2010-06-02 12:23:50 +0000
+++ b/sql/field.h 2010-07-20 02:27:11 +0000
@@ -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;
=== modified file 'sql/item_geofunc.cc'
--- a/sql/item_geofunc.cc 2010-03-31 14:05:33 +0000
+++ b/sql/item_geofunc.cc 2010-07-20 02:27:11 +0000
@@ -49,7 +49,7 @@ void Item_geometry_func::fix_length_and_
{
collation.set(&my_charset_bin);
decimals=0;
- max_length= max_field_size;
+ max_length= (uint32) 4294967295U;
maybe_null= 1;
}
=== modified file 'sql/log.h'
--- a/sql/log.h 2010-07-15 13:47:50 +0000
+++ b/sql/log.h 2010-07-20 02:27:11 +0000
@@ -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);
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2010-07-16 20:02:40 +0000
+++ b/sql/mysqld.cc 2010-07-20 02:27:11 +0000
@@ -294,12 +294,6 @@ arg_cmp_func Arg_comparator::comparator_
{&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; ///< I
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;
=== modified file 'sql/mysqld.h'
--- a/sql/mysqld.h 2010-05-28 05:47:58 +0000
+++ b/sql/mysqld.h 2010-07-20 02:27:11 +0000
@@ -78,9 +78,6 @@ extern MYSQL_PLUGIN_IMPORT 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_re
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))
=== modified file 'sql/repl_failsafe.cc'
--- a/sql/repl_failsafe.cc 2010-07-15 13:47:50 +0000
+++ b/sql/repl_failsafe.cc 2010-07-20 02:27:11 +0000
@@ -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,
=== modified file 'sql/repl_failsafe.h'
--- a/sql/repl_failsafe.h 2010-01-25 21:34:34 +0000
+++ b/sql/repl_failsafe.h 2010-07-20 02:27:11 +0000
@@ -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);
=== modified file 'sql/set_var.h'
--- a/sql/set_var.h 2010-07-02 19:38:04 +0000
+++ b/sql/set_var.h 2010-07-20 02:27:11 +0000
@@ -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 */
/****************************************************************************
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2010-07-15 13:47:50 +0000
+++ b/sql/slave.cc 2010-07-20 02:27:11 +0000
@@ -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);
=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc 2010-07-08 21:20:08 +0000
+++ b/sql/sql_lex.cc 2010-07-20 02:27:11 +0000
@@ -41,7 +41,6 @@ sys_var *trg_new_row_fake_var= (sys_var*
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.
=== modified file 'sql/sql_lex.h'
--- a/sql/sql_lex.h 2010-06-22 16:40:14 +0000
+++ b/sql/sql_lex.h 2010-07-20 02:27:11 +0000
@@ -995,8 +995,6 @@ enum xa_option_words {XA_NONE, XA_JOIN,
XA_SUSPEND, XA_FOR_MIGRATE};
extern const LEX_STRING null_lex_str;
-extern const LEX_STRING empty_lex_str;
-
class Sroutine_hash_entry;
=== modified file 'sql/sql_priv.h'
--- a/sql/sql_priv.h 2010-06-17 13:31:51 +0000
+++ b/sql/sql_priv.h 2010-07-20 02:27:11 +0000
@@ -59,8 +59,6 @@
(Old), (New)); \
} while(0)
-extern char err_shared_dir[];
-
/*************************************************************************/
#endif
=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc 2010-07-19 14:00:29 +0000
+++ b/sql/sys_vars.cc 2010-07-20 02:27:11 +0000
@@ -2866,6 +2866,8 @@ static bool fix_log_output(sys_var *self
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",
=== modified file 'storage/myisam/mi_static.c'
--- a/storage/myisam/mi_static.c 2010-07-15 11:16:06 +0000
+++ b/storage/myisam/mi_static.c 2010-07-20 02:27:11 +0000
@@ -38,7 +38,6 @@ uint myisam_concurrent_insert= 2;
uint myisam_concurrent_insert= 0;
#endif
ulonglong myisam_max_temp_length= MAX_FILE_SIZE;
-ulong myisam_bulk_insert_tree_size=8192*1024;
ulong myisam_data_pointer_size=4;
ulonglong myisam_mmap_size= SIZE_T_MAX, myisam_mmap_used= 0;
=== modified file 'storage/perfschema/pfs_events_waits.cc'
--- a/storage/perfschema/pfs_events_waits.cc 2010-07-15 23:44:45 +0000
+++ b/storage/perfschema/pfs_events_waits.cc 2010-07-20 02:27:11 +0000
@@ -39,7 +39,6 @@ bool flag_events_waits_summary_by_thread
bool flag_events_waits_summary_by_event_name= true;
/** Consumer flag for table EVENTS_WAITS_SUMMARY_BY_INSTANCE. */
bool flag_events_waits_summary_by_instance= true;
-bool flag_events_locks_summary_by_thread_by_event_name= true;
bool flag_events_locks_summary_by_event_name= true;
bool flag_events_locks_summary_by_instance= true;
/** Consumer flag for table FILE_SUMMARY_BY_EVENT_NAME. */
Attachment: [text/bzr-bundle] bzr/davi.arnaut@oracle.com-20100720022711-pd5zt8c6flh03ssw.bundle