mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Embedded mysql fixes.
There is now a mysql_server_init() function which needs to be called at the beginning of the program (and _end() for the end of the program). This routine handles argument parsing for the embedded server. Use the embedded version of mysql_load_file() (ignore the LOCAL argument, since the client and server are the same program). There are now mysql_thread_init/end() functions for the client to use in a multi-threaded app. They are just wrappers for my_thread_init/end().
This commit is contained in:
@ -75,14 +75,12 @@ my_string mysql_unix_port=0;
|
||||
#endif
|
||||
|
||||
/* XXX: this is real ugly... */
|
||||
static void mysql_once_init(void);
|
||||
extern void embedded_srv_init(void);
|
||||
extern void embedded_srv_deinit(void);
|
||||
extern void start_embedded_connection(NET * net);
|
||||
extern void lib_connection_phase(NET *net, int phase);
|
||||
extern bool lib_dispatch_command(enum enum_server_command command, NET *net,
|
||||
const char *arg, ulong length);
|
||||
|
||||
static void mysql_once_init(void);
|
||||
static MYSQL_DATA *read_rows (MYSQL *mysql,MYSQL_FIELD *fields,
|
||||
uint field_count);
|
||||
static int read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row,
|
||||
@ -791,10 +789,8 @@ static void mysql_once_init()
|
||||
{
|
||||
mysql_client_init=1;
|
||||
my_init(); /* Will init threads */
|
||||
embedded_srv_init();
|
||||
init_client_errs();
|
||||
mysql_port = MYSQL_PORT;
|
||||
DEBUGGER_ON;
|
||||
mysql_debug(NullS);
|
||||
}
|
||||
#ifdef THREAD
|
||||
|
Reference in New Issue
Block a user