diff options
author | monty@mysql.com <> | 2003-12-11 06:24:08 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2003-12-11 06:24:08 +0200 |
commit | 7e92336b1da07c6424f3bdffcc5d3edf268268fa (patch) | |
tree | 1122f20a76a6996599a4c136c6be17aecb8f8bf6 /mysys/my_init.c | |
parent | 34d0a16476e0db669bbe7cd9e56bb1d55ac1f18d (diff) | |
download | mariadb-git-7e92336b1da07c6424f3bdffcc5d3edf268268fa.tar.gz |
Fixed a possible memory leak on MacOSX when using the shared libmysql.so library (Bug #2061)
mysql_server_init() now returns error code if something went wrong (Bug #2062)
Don't use my_fopen() when reading symlink information as this may cause problems when a lot of files are opened.
Free thread keys with pthread_key_delete() instead of relying on automatic free. (Bug #2062)
Fixed bug in UNION statement with alias '*'. (Bug #1249)
Fixed a bug in DELETE ... ORDER BY ... LIMIT where the rows where not deleted in the proper order. (Bug #1024).
FOUND_ROWS() could return incorrect number of rows after a query with an impossible WHERE condition.
HOW DATABASES doesn't anymore show .sym files (on windows) that doesn't point to a valid directory. (Bug #1385)
Diffstat (limited to 'mysys/my_init.c')
-rw-r--r-- | mysys/my_init.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c index a8a184a2cb4..8d4ba2c97b6 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -62,13 +62,22 @@ static ulong atoi_octal(const char *str) } - /* Init my_sys functions and my_sys variabels */ +/* + Init my_sys functions and my_sys variabels + + SYNOPSIS + my_init() -void my_init(void) + RETURN + 0 ok + 1 Couldn't initialize environment +*/ + +my_bool my_init(void) { my_string str; if (my_init_done) - return; + return 0; my_init_done=1; #if defined(THREAD) && defined(SAFE_MUTEX) safe_mutex_global_init(); /* Must be called early */ @@ -78,7 +87,8 @@ void my_init(void) #if defined(HAVE_PTHREAD_INIT) pthread_init(); /* Must be called before DBUG_ENTER */ #endif - my_thread_global_init(); + if (my_thread_global_init()) + return 1; #if !defined( __WIN__) && !defined(OS2) && !defined(__NETWARE__) sigfillset(&my_signals); /* signals blocked by mf_brkhant */ #endif @@ -110,7 +120,7 @@ void my_init(void) #ifdef __WIN__ win32_init_tcp_ip(); #endif - DBUG_VOID_RETURN; + DBUG_RETURN(0); } } /* my_init */ |