summaryrefslogtreecommitdiff
path: root/mysys/thr_mutex.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-09-22 01:46:26 +0300
committerunknown <monty@donna.mysql.com>2000-09-22 01:46:26 +0300
commit5f12486229fb578f2e170238ab2cdd7c9bf42a82 (patch)
tree578e79cb989b0a5458b2f7b7cd27600813a79432 /mysys/thr_mutex.c
parent5e955288bc695e2f7a92c5549c7753309b41bed7 (diff)
downloadmariadb-git-5f12486229fb578f2e170238ab2cdd7c9bf42a82.tar.gz
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)
Diffstat (limited to 'mysys/thr_mutex.c')
-rw-r--r--mysys/thr_mutex.c9
1 files changed, 5 insertions, 4 deletions
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;
}