502
502
static void fix_paths(void);
503
503
void handle_connections_sockets();
504
504
pthread_handler_t kill_server_thread(void *arg);
505
static void bootstrap(FILE *file);
506
static bool read_init_file(char *file_name);
507
505
pthread_handler_t handle_slave(void *arg);
508
506
static ulong find_bit_type(const char *x, TYPELIB *bit_lib);
509
507
static ulong find_bit_type_or_exit(const char *x, TYPELIB *bit_lib,
2917
2915
unireg_abort(1);
2922
select_thread_in_use= 0; // Allow 'kill' to work
2924
unireg_abort(bootstrap_error ? 1 : 0);
2928
if (read_init_file(opt_init_file))
2932
2918
create_maintenance_thread();
2934
2920
sql_print_information(ER(ER_STARTUP),my_progname,server_version,
2968
Execute all commands from a file. Used by the mysql_install_db script to
2969
create MySQL privilege tables without having to start a full MySQL server.
2972
static void bootstrap(FILE *file)
2974
DBUG_ENTER("bootstrap");
2978
my_net_init(&thd->net,(st_vio*) 0);
2979
thd->max_client_packet_length= thd->net.max_packet;
2980
thd->thread_id= thd->variables.pseudo_thread_id= thread_id++;
2983
bootstrap_file=file;
2984
if (pthread_create(&thd->real_id,&connection_attrib,handle_bootstrap,
2987
sql_print_warning("Can't create thread to handle bootstrap");
2991
/* Wait for thread to die */
2992
(void) pthread_mutex_lock(&LOCK_thread_count);
2993
while (thread_count)
2995
(void) pthread_cond_wait(&COND_thread_count,&LOCK_thread_count);
2996
DBUG_PRINT("quit",("One thread died (count=%u)",thread_count));
2998
(void) pthread_mutex_unlock(&LOCK_thread_count);
3004
static bool read_init_file(char *file_name)
3007
DBUG_ENTER("read_init_file");
3008
DBUG_PRINT("enter",("name: %s",file_name));
3009
if (!(file=my_fopen(file_name,O_RDONLY,MYF(MY_WME))))
3012
(void) my_fclose(file,MYF(MY_WME));
3018
2954
Create new thread to handle incoming connection.
3020
2956
This function will create new thread to handle the incoming