Bootstrap cleanups
Remove unused key_thread_bootstrap. No more global bootstrap_error: it is return value of bootstrap() instead.
This commit is contained in:
parent
ffa4677c09
commit
4d5f85a3ec
@ -647,8 +647,6 @@ Lt_creator lt_creator;
|
||||
Ge_creator ge_creator;
|
||||
Le_creator le_creator;
|
||||
|
||||
int bootstrap_error;
|
||||
|
||||
THD_list server_threads;
|
||||
Rpl_filter* cur_rpl_filter;
|
||||
Rpl_filter* global_rpl_filter;
|
||||
@ -1105,7 +1103,7 @@ static PSI_cond_info all_server_conds[]=
|
||||
{ &key_TABLE_SHARE_COND_rotation, "TABLE_SHARE::COND_rotation", 0}
|
||||
};
|
||||
|
||||
PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert,
|
||||
PSI_thread_key key_thread_delayed_insert,
|
||||
key_thread_handle_manager, key_thread_main,
|
||||
key_thread_one_connection, key_thread_signal_hand,
|
||||
key_thread_slave_background, key_rpl_parallel_thread;
|
||||
@ -1113,7 +1111,6 @@ PSI_thread_key key_thread_ack_receiver;
|
||||
|
||||
static PSI_thread_info all_server_threads[]=
|
||||
{
|
||||
{ &key_thread_bootstrap, "bootstrap", PSI_FLAG_GLOBAL},
|
||||
{ &key_thread_delayed_insert, "delayed_insert", 0},
|
||||
{ &key_thread_handle_manager, "manager", PSI_FLAG_GLOBAL},
|
||||
{ &key_thread_main, "main", PSI_FLAG_GLOBAL},
|
||||
@ -5768,9 +5765,9 @@ int mysqld_main(int argc, char **argv)
|
||||
if (opt_bootstrap)
|
||||
{
|
||||
select_thread_in_use= 0; // Allow 'kill' to work
|
||||
bootstrap(mysql_stdin);
|
||||
int bootstrap_error= bootstrap(mysql_stdin);
|
||||
if (!abort_loop)
|
||||
unireg_abort(bootstrap_error ? 1 : 0);
|
||||
unireg_abort(bootstrap_error);
|
||||
else
|
||||
{
|
||||
sleep(2); // Wait for kill
|
||||
|
@ -297,7 +297,6 @@ extern "C" MYSQL_PLUGIN_IMPORT char **orig_argv;
|
||||
extern pthread_attr_t connection_attrib;
|
||||
extern my_bool old_mode;
|
||||
extern LEX_STRING opt_init_connect, opt_init_slave;
|
||||
extern int bootstrap_error;
|
||||
extern char err_shared_dir[];
|
||||
extern ulong connection_errors_select;
|
||||
extern ulong connection_errors_accept;
|
||||
@ -394,7 +393,7 @@ extern PSI_cond_key key_COND_rpl_thread, key_COND_rpl_thread_queue,
|
||||
extern PSI_cond_key key_COND_wait_gtid, key_COND_gtid_ignore_duplicates;
|
||||
extern PSI_cond_key key_TABLE_SHARE_COND_rotation;
|
||||
|
||||
extern PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert,
|
||||
extern PSI_thread_key key_thread_delayed_insert,
|
||||
key_thread_handle_manager, key_thread_kill_server, key_thread_main,
|
||||
key_thread_one_connection, key_thread_signal_hand,
|
||||
key_thread_slave_background, key_rpl_parallel_thread;
|
||||
|
@ -979,8 +979,9 @@ static char *fgets_fn(char *buffer, size_t size, fgets_input_t input, int *error
|
||||
}
|
||||
|
||||
|
||||
void bootstrap(MYSQL_FILE *file)
|
||||
int bootstrap(MYSQL_FILE *file)
|
||||
{
|
||||
int bootstrap_error= 0;
|
||||
DBUG_ENTER("handle_bootstrap");
|
||||
|
||||
THD *thd= new THD(next_thread_id());
|
||||
@ -1105,7 +1106,7 @@ void bootstrap(MYSQL_FILE *file)
|
||||
thd->lex->restore_set_statement_var();
|
||||
}
|
||||
delete thd;
|
||||
DBUG_VOID_RETURN;
|
||||
DBUG_RETURN(bootstrap_error);
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,7 +99,7 @@ void create_table_set_open_action_and_adjust_tables(LEX *lex);
|
||||
void mysql_init_multi_delete(LEX *lex);
|
||||
bool multi_delete_set_locks_and_link_aux_tables(LEX *lex);
|
||||
void create_table_set_open_action_and_adjust_tables(LEX *lex);
|
||||
void bootstrap(MYSQL_FILE *file);
|
||||
int bootstrap(MYSQL_FILE *file);
|
||||
int mysql_execute_command(THD *thd);
|
||||
bool do_command(THD *thd);
|
||||
bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
|
Loading…
x
Reference in New Issue
Block a user