summaryrefslogtreecommitdiff
path: root/sql/event_scheduler.cc
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@mysql.com>2009-11-23 17:57:21 +0100
committerMikael Ronstrom <mikael@mysql.com>2009-11-23 17:57:21 +0100
commit39703a1b933779436cbb2b0d2fcdd99a0864855b (patch)
tree7d0f1fe51118f6b5bff98f8af1bc2d11647e0fde /sql/event_scheduler.cc
parent0e613ab88486f275f2fed06dea3f85109d90e248 (diff)
downloadmariadb-git-39703a1b933779436cbb2b0d2fcdd99a0864855b.tar.gz
WL#5138, fixed review comments
Diffstat (limited to 'sql/event_scheduler.cc')
-rw-r--r--sql/event_scheduler.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc
index 411be5a9d20..69e5f30ad31 100644
--- a/sql/event_scheduler.cc
+++ b/sql/event_scheduler.cc
@@ -133,10 +133,8 @@ post_init_event_thread(THD *thd)
pthread_mutex_lock(&LOCK_thread_count);
threads.append(thd);
thread_count++;
- pthread_mutex_unlock(&LOCK_thread_count);
- my_atomic_rwlock_wrlock(&global_query_id_lock);
inc_thread_running();
- my_atomic_rwlock_wrunlock(&global_query_id_lock);
+ pthread_mutex_unlock(&LOCK_thread_count);
return FALSE;
}
@@ -158,9 +156,7 @@ deinit_event_thread(THD *thd)
DBUG_PRINT("exit", ("Event thread finishing"));
pthread_mutex_lock(&LOCK_thread_count);
thread_count--;
- my_atomic_rwlock_wrlock(&global_query_id_lock);
dec_thread_running();
- my_atomic_rwlock_wrunlock(&global_query_id_lock);
delete thd;
pthread_cond_broadcast(&COND_thread_count);
pthread_mutex_unlock(&LOCK_thread_count);
@@ -421,9 +417,7 @@ Event_scheduler::start()
net_end(&new_thd->net);
pthread_mutex_lock(&LOCK_thread_count);
thread_count--;
- my_atomic_rwlock_wrlock(&global_query_id_lock);
dec_thread_running();
- my_atomic_rwlock_wrunlock(&global_query_id_lock);
delete new_thd;
pthread_cond_broadcast(&COND_thread_count);
pthread_mutex_unlock(&LOCK_thread_count);
@@ -556,9 +550,7 @@ error:
net_end(&new_thd->net);
pthread_mutex_lock(&LOCK_thread_count);
thread_count--;
- my_atomic_rwlock_wrlock(&global_query_id_lock);
dec_thread_running();
- my_atomic_rwlock_wrunlock(&global_query_id_lock);
delete new_thd;
pthread_cond_broadcast(&COND_thread_count);
pthread_mutex_unlock(&LOCK_thread_count);