summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authormonty@mishka.local <>2005-05-06 11:39:30 +0300
committermonty@mishka.local <>2005-05-06 11:39:30 +0300
commita9f6aab4c9fb3a5f06c95227d70c9bf44e25f957 (patch)
tree9bc36292e6c63e524c34d371f01eb8a1ec82d9ee /mysys
parentc83b78169e52a40241d0dc0e88cddbd84420c572 (diff)
downloadmariadb-git-a9f6aab4c9fb3a5f06c95227d70c9bf44e25f957.tar.gz
Fixes while reviewing new code
Added option --count to mysqlshow (to show number of rows) Fixed possible core dump in information schema
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_thr_init.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 878e1f6bfc6..4d23d01cd82 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -67,12 +67,11 @@ my_bool my_thread_global_init(void)
/*
Set mutex type to "fast" a.k.a "adaptive"
- The mutex kind determines what happens if a thread attempts to lock
- a mutex it already owns with pthread_mutex_lock(3). If the mutex
- is of the ``fast'' kind, pthread_mutex_lock(3) simply suspends
- the calling thread forever. If the mutex is of the ``error checking''
- kind, pthread_mutex_lock(3) returns immediately with the error
- code EDEADLK.
+ In this case the thread may steal the mutex from some other thread
+ that is waiting for the same mutex. This will save us some
+ context switches but may cause a thread to 'starve forever' while
+ waiting for the mutex (not likely if the code within the mutex is
+ short).
*/
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_settype(&my_fast_mutexattr,