summaryrefslogtreecommitdiff
path: root/mysys/my_pthread.c
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-01-28 08:38:28 +0200
committermonty@mashka.mysql.fi <>2003-01-28 08:38:28 +0200
commit689578a0997f54c590bcf4791e30710602851bc4 (patch)
treeb916d4acfbe4f32ab06b052fd06c072f858bdce1 /mysys/my_pthread.c
parent1bdd1d0626fdb8f858a3c4bf82e0064ee19b042d (diff)
downloadmariadb-git-689578a0997f54c590bcf4791e30710602851bc4.tar.gz
Fixes for Netware
Call pthread_mutex_destroy() on not used mutex. Changed comments in .h and .c files from // -> /* */ Added detection of mutex on which one didn't call pthread_mutex_destroy() Fixed bug in create_tmp_field() which causes a memory overrun in queries that uses "ORDER BY constant_expression" Added optimisation for ORDER BY NULL
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r--mysys/my_pthread.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 07e8ecec6ac..0de7041fae7 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -425,6 +425,19 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr)
#endif
+#ifdef __NETWARE__
+/* NetWare does not re-acquire the lock if the condition fails */
+int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
+ struct timespec *abstime)
+{
+ int err= pthread_cond_timedwait(cond, mutex, abstime);
+ if (err)
+ pthread_mutex_lock(mutex);
+ return err;
+}
+#endif /* __NETWARE__ */
+
+
/*****************************************************************************
Patches for HPUX
We need these because the pthread_mutex.. code returns -1 on error,