summaryrefslogtreecommitdiff
path: root/mysys/my_thr_init.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-16 16:32:51 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-16 16:32:51 +0300
commitd2b95cd7ab5b3ed450af572e9c77cd11d3c420ba (patch)
tree145820cb9685468167f09ba07a59a1f61ca640cf /mysys/my_thr_init.c
parenteba5ec8b4bceabab302462db850882f715a7b040 (diff)
downloadmariadb-git-d2b95cd7ab5b3ed450af572e9c77cd11d3c420ba.tar.gz
New my_gethostbyname_r() handling
Changed some status variable names Fix bug in GRANT ... PASSWORD string Docs/manual.texi: Update of variable names include/my_net.h: New my_gethostbyname_r() handling include/my_pthread.h: New my_gethostbyname_r() handling libmysql/Makefile.shared: New my_gethostbyname_r() handling libmysql/libmysql.c: New my_gethostbyname_r() handling mysys/Makefile.am: New my_gethostbyname_r() handling mysys/my_pthread.c: New my_gethostbyname_r() handling mysys/my_thr_init.c: New my_gethostbyname_r() handling sql/hostname.cc: New my_gethostbyname_r() handling sql/mini_client.cc: New my_gethostbyname_r() handling sql/mysqld.cc: change some status variable names sql/sql_acl.cc: 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;