diff options
author | unknown <monty@mashka.mysql.fi> | 2003-09-11 20:24:14 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-09-11 20:24:14 +0300 |
commit | d32bdcb1bfc274476cdd945e66e00f3ec31253c3 (patch) | |
tree | 20f0ccc7be8e0d205ea5a00d6ec5f57a14d85d3f /libmysqld | |
parent | dd0d199ebeab47facb4d01269cda97c258491c22 (diff) | |
parent | 3f6d78f6c7ad5eb00c4d24b0f0b839a1fb1ead25 (diff) | |
download | mariadb-git-d32bdcb1bfc274476cdd945e66e00f3ec31253c3.tar.gz |
merge with 4.0.15
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql:
Delete: scripts/mysql_fix_privilege_tables.sql
include/mysql.h:
Auto merged
myisam/mi_open.c:
Auto merged
myisam/mi_update.c:
Auto merged
myisam/myisampack.c:
Auto merged
mysql-test/r/bdb.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/t/bdb.test:
Auto merged
mysql-test/t/grant.test:
Auto merged
mysql-test/t/range.test:
Auto merged
scripts/make_win_src_distribution.sh:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/lib_sql.cc | 7 | ||||
-rw-r--r-- | libmysqld/libmysqld.c | 12 |
2 files changed, 10 insertions, 9 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 00ec550273c..892a21ed08b 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -26,7 +26,8 @@ static int fake_argc= 1; static char *fake_argv[]= {(char *)"", 0}; static const char *fake_groups[] = { "server", "embedded", 0 }; -static char inited, org_my_init_done; +static my_bool org_my_init_done; +my_bool server_inited; #if defined (__WIN__) #include "../sql/mysqld.cpp" @@ -181,9 +182,9 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups) /* Only call MY_INIT() if it hasn't been called before */ - if (!inited) + if (!server_inited) { - inited=1; + server_inited=1; org_my_init_done=my_init_done; } if (!org_my_init_done) diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 48b3397ee7c..05e5ff59b55 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -210,11 +210,9 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, db ? db : "(Null)", user ? user : "(Null)")); - if (mysql->options.methods_to_use == MYSQL_OPT_USE_REMOTE_CONNECTION) - cli_mysql_real_connect(mysql, host, user, - passwd, db, port, unix_socket, client_flag); - if ((mysql->options.methods_to_use == MYSQL_OPT_GUESS_CONNECTION) && - host && strcmp(host,LOCAL_HOST)) + 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); @@ -277,7 +275,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, DBUG_RETURN(mysql); error: - DBUG_PRINT("error",("message: %u (%s)",mysql->net.last_errno,mysql->net.last_error)); + DBUG_PRINT("error",("message: %u (%s)", mysql->net.last_errno, + mysql->net.last_error)); { /* Free alloced memory */ my_bool free_me=mysql->free_me; @@ -289,6 +288,7 @@ error: DBUG_RETURN(0); } + /************************************************************************* ** Send a QUIT to the server and close the connection ** If handle is alloced by mysql connect free it. |