1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for #2126 (mysql_server_init call shouldn't be needed)

now mysql_server_init is called from mysql_init with fake parameters
mysql_once_init code included to mysql_server_init.
embedded-specific initialization is in init_embedded_server function
This commit is contained in:
hf@deer.(none)
2003-12-18 15:51:22 +04:00
parent 2b53eef5f0
commit 42799cc584
12 changed files with 33 additions and 57 deletions

View File

@ -163,20 +163,12 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
db ? db : "(Null)",
user ? user : "(Null)"));
#if defined(EMBEDDED_LIBRARY) || !defined(DBUG_OFF)
if (!server_inited)
{
mysql->net.last_errno=CR_MYSQL_SERVER_INIT_MISSED;
strmov(mysql->net.last_error,ER(mysql->net.last_errno));
goto error;
}
#endif
if (mysql->options.methods_to_use == MYSQL_OPT_USE_REMOTE_CONNECTION ||
(mysql->options.methods_to_use == MYSQL_OPT_GUESS_CONNECTION &&
host && strcmp(host,LOCAL_HOST)))
cli_mysql_real_connect(mysql, host, user,
passwd, db, port, unix_socket, client_flag);
DBUG_RETURN(cli_mysql_real_connect(mysql, host, user,
passwd, db, port,
unix_socket, client_flag));
mysql->methods= &embedded_methods;