From 06828d178a2f4bf20d3ace743ca041be1fa9e508 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 24 Mar 2001 20:15:14 +0200 Subject: Added defines for fast mutex in glibc 2.2 (should be safe) Fixed crash in SELECT DISTINCT SUM(...) Fix return value of mysortncmp() for innobase Fix join_crash bug Docs/manual.texi: Changelog include/my_pthread.h: Added defines for fast mutex in glibc 2.2 mysql-test/t/join_crash.test: Changed table names to t1,t2... mysys/my_bitmap.c: Use fast mutex mysys/my_open.c: Use fast mutex mysys/my_pthread.c: Use fast mutex mysys/my_thr_init.c: Use fast mutex mysys/my_winthread.c: Use fast mutex mysys/thr_mutex.c: Use new mutexattr with error checking sql/ha_innobase.cc: Fix return value of mysortncmp() for innobase sql/sql_select.cc: Fix join_crash bug BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- mysys/thr_mutex.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'mysys/thr_mutex.c') diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c index 7cc3b30aaf9..fa7ae4f1e82 100644 --- a/mysys/thr_mutex.c +++ b/mysys/thr_mutex.c @@ -43,19 +43,8 @@ int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr __attribute__((unused))) { bzero((char*) mp,sizeof(*mp)); -#ifdef HAVE_LINUXTHREADS /* Some extra safety */ - { - pthread_mutexattr_t tmp; - pthread_mutexattr_init(&tmp); - pthread_mutexattr_setkind_np(&tmp,PTHREAD_MUTEX_ERRORCHECK_NP); - pthread_mutex_init(&mp->global,&tmp); - pthread_mutex_init(&mp->mutex, &tmp); - pthread_mutexattr_destroy(&tmp); - } -#else - pthread_mutex_init(&mp->global,NULL); + pthread_mutex_init(&mp->global,MY_MUTEX_INIT_ERRCHK); pthread_mutex_init(&mp->mutex,attr); -#endif return 0; } -- cgit v1.2.1