From dad723f7c74ec786cc6569cbcf0f81b782e28128 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Sep 2000 01:46:26 +0300 Subject: Fixes for MyISAM and packed keys + AIX Docs/manual.texi: Updated changelog client/mysql.cc: Free all memory, even if we can't connect to the server include/config-win.h: Ensure that we don't use SAFE_MUTEX on windows include/my_pthread.h: Optimze struct for Ia64 include/myisam.h: Hack for debugging BIG tables myisam/mi_check.c: Hack for debugging BIG tables myisam/mi_search.c: Fixed bug in packed keys myisam/myisamchk.c: Hack for debugging BIG tables mysys/thr_mutex.c: Make safe_mutex safe for windows scripts/safe_mysqld.sh: Fix nice test and echo output sql/share/Makefile.am: Fix character sets sql/sql_string.cc: Fixes for AIX (which can't handle that the length argument is 0) --- mysys/thr_mutex.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mysys/thr_mutex.c') diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c index 149a30a4b24..7cc3b30aaf9 100644 --- a/mysys/thr_mutex.c +++ b/mysys/thr_mutex.c @@ -219,7 +219,7 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line) { - int error; + int error=0; if (mp->count != 0) { fprintf(stderr,"safe_mutex: Trying to destroy a mutex that was locked at %s, line %d at %s, line %d\n", @@ -228,12 +228,13 @@ int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line) abort(); } #ifdef __WIN__ - error=0; pthread_mutex_destroy(&mp->global); pthread_mutex_destroy(&mp->mutex); #else - error= (int) (pthread_mutex_destroy(&mp->global) || - pthread_mutex_destroy(&mp->mutex)); + if (pthread_mutex_destroy(&mp->global)) + error=1; + if (pthread_mutex_destroy(&mp->mutex)) + error=1; #endif return error; } -- cgit v1.2.1