summaryrefslogtreecommitdiff
path: root/mysys/my_thr_init.c
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-05-16 16:32:51 +0300
committermonty@hundin.mysql.fi <>2002-05-16 16:32:51 +0300
commit353fb57b741ee01054a0f2a9eb83c44d0bc4dcd2 (patch)
tree145820cb9685468167f09ba07a59a1f61ca640cf /mysys/my_thr_init.c
parent14b55bcc72554f3f356df4e7b1d8e7c8244de959 (diff)
downloadmariadb-git-353fb57b741ee01054a0f2a9eb83c44d0bc4dcd2.tar.gz
New my_gethostbyname_r() handling
Changed some status variable names Fix bug in GRANT ... PASSWORD string
Diffstat (limited to 'mysys/my_thr_init.c')
-rw-r--r--mysys/my_thr_init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index e1f9e23912e..2782576d8cd 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -35,6 +35,9 @@ pthread_mutex_t THR_LOCK_malloc,THR_LOCK_open,THR_LOCK_keycache,
#ifndef HAVE_LOCALTIME_R
pthread_mutex_t LOCK_localtime_r;
#endif
+#ifndef HAVE_GETHOSTBYNAME_R
+pthread_mutex_t LOCK_gethostbyname_r;
+#endif
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_t my_fast_mutexattr;
#endif
@@ -78,6 +81,9 @@ my_bool my_thread_global_init(void)
#ifndef HAVE_LOCALTIME_R
pthread_mutex_init(&LOCK_localtime_r,MY_MUTEX_INIT_SLOW);
#endif
+#ifndef HAVE_GETHOSTBYNAME_R
+ pthread_mutex_init(&LOCK_gethostbyname_r,MY_MUTEX_INIT_SLOW);
+#endif
return my_thread_init();
}
@@ -92,6 +98,9 @@ void my_thread_global_end(void)
#ifdef PPTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_errchk_mutexattr);
#endif
+#ifndef HAVE_GETHOSTBYNAME_R
+ pthread_mutex_destroy(&LOCK_gethostbyname_r);
+#endif
}
static long thread_id=0;