mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix for Windows bug reported throuhg Miguel
libmysqld/lib_sql.cc: This code seems to be superfluous sql/derror.cc: in embedded server these functions should return the sign of the error instead of halting the program sql/init.cc: my_abort_hook left unchanged sql/mysql_priv.h: declaration of init_errmessage changed unireg_abort was replaced with DBUG_RETURN for embedded server sql/mysqld.cc: these functions don't work in embedded server thus #ifdef-ed
This commit is contained in:
@ -845,6 +845,7 @@ extern "C" sig_handler print_signal_warning(int sig)
|
||||
(Mac OS X) we have to call exit() instead if pthread_exit().
|
||||
*/
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
void unireg_end(void)
|
||||
{
|
||||
clean_up(1);
|
||||
@ -856,7 +857,6 @@ void unireg_end(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
extern "C" void unireg_abort(int exit_code)
|
||||
{
|
||||
DBUG_ENTER("unireg_abort");
|
||||
@ -868,7 +868,7 @@ extern "C" void unireg_abort(int exit_code)
|
||||
my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
|
||||
exit(exit_code); /* purecov: inspected */
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void clean_up(bool print_message)
|
||||
{
|
||||
@ -1015,6 +1015,7 @@ static void set_ports()
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
/* Change to run as another user if started with --user */
|
||||
|
||||
static void set_user(const char *user)
|
||||
@ -1097,7 +1098,6 @@ static void set_root(const char *path)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static void server_init(void)
|
||||
{
|
||||
struct sockaddr_in IPaddr;
|
||||
@ -1248,6 +1248,7 @@ static void server_init(void)
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
#endif /*!EMBEDDED_LIBRARY*/
|
||||
|
||||
void yyerror(const char *s)
|
||||
{
|
||||
@ -2081,7 +2082,8 @@ static int init_common_variables(const char *conf_file_name, int argc,
|
||||
open_files_limit= 0; /* Can't set or detect limit */
|
||||
#endif
|
||||
unireg_init(opt_specialflag); /* Set up extern variabels */
|
||||
init_errmessage(); /* Read error messages from file */
|
||||
if (init_errmessage()) /* Read error messages from file */
|
||||
return 1;
|
||||
init_client_errs();
|
||||
lex_init();
|
||||
item_init();
|
||||
@ -2188,6 +2190,7 @@ static void init_ssl()
|
||||
|
||||
static int init_server_components()
|
||||
{
|
||||
DBUG_ENTER("init_server_components");
|
||||
table_cache_init();
|
||||
hostname_cache_init();
|
||||
query_cache_result_size_limit(query_cache_limit);
|
||||
@ -2279,7 +2282,7 @@ Now disabling --log-slave-updates.");
|
||||
|
||||
init_max_user_conn();
|
||||
init_update_queries();
|
||||
return 0;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
@ -5537,8 +5540,10 @@ static void get_options(int argc,char **argv)
|
||||
/* Set global MyISAM variables from delay_key_write_options */
|
||||
fix_delay_key_write((THD*) 0, OPT_GLOBAL);
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
if (mysqld_chroot)
|
||||
set_root(mysqld_chroot);
|
||||
#endif
|
||||
fix_paths();
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user