WL#5498: Remove dead and unused source code
Remove unused variables.
This commit is contained in:
parent
9fd9857e0b
commit
dd14fa18af
@ -187,8 +187,6 @@ typedef struct st_lf_allocator {
|
||||
uchar * volatile top;
|
||||
uint element_size;
|
||||
uint32 volatile mallocs;
|
||||
void (*constructor)(uchar *); /* called, when an object is malloc()'ed */
|
||||
void (*destructor)(uchar *); /* called, when an object is free()'d */
|
||||
} LF_ALLOCATOR;
|
||||
|
||||
void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset);
|
||||
@ -222,8 +220,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 */
|
||||
|
@ -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 */
|
||||
|
@ -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=
|
||||
|
@ -448,8 +448,6 @@ void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset)
|
||||
allocator->top= 0;
|
||||
allocator->mallocs= 0;
|
||||
allocator->element_size= size;
|
||||
allocator->constructor= 0;
|
||||
allocator->destructor= 0;
|
||||
DBUG_ASSERT(size >= sizeof(void*) + free_ptr_offset);
|
||||
}
|
||||
|
||||
@ -470,8 +468,6 @@ void lf_alloc_destroy(LF_ALLOCATOR *allocator)
|
||||
while (node)
|
||||
{
|
||||
uchar *tmp= anext_node(node);
|
||||
if (allocator->destructor)
|
||||
allocator->destructor(node);
|
||||
my_free(node);
|
||||
node= tmp;
|
||||
}
|
||||
@ -500,8 +496,6 @@ void *_lf_alloc_new(LF_PINS *pins)
|
||||
if (!node)
|
||||
{
|
||||
node= (void *)my_malloc(allocator->element_size, MYF(MY_WME));
|
||||
if (allocator->constructor)
|
||||
allocator->constructor(node);
|
||||
#ifdef MY_LF_EXTRA_DEBUG
|
||||
if (likely(node != 0))
|
||||
my_atomic_add32(&allocator->mallocs, 1);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -59,8 +59,6 @@
|
||||
(Old), (New)); \
|
||||
} while(0)
|
||||
|
||||
extern char err_shared_dir[];
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#endif
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
||||
|
@ -39,7 +39,6 @@ bool flag_events_waits_summary_by_thread_by_event_name= true;
|
||||
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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user