diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-11-20 16:43:21 +0100 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-11-20 16:43:21 +0100 |
commit | c9442b67f61e94a2489a360f2f627f5b82341d90 (patch) | |
tree | e110bfa2dc5b65c3600ba66b08771af9d896620a | |
parent | b6c1ecb37fb0c41bc68cd4e415a96e2e7444d9fc (diff) | |
download | mariadb-git-c9442b67f61e94a2489a360f2f627f5b82341d90.tar.gz |
WL#5138, review fixes
-rw-r--r-- | sql/event_scheduler.cc | 18 | ||||
-rw-r--r-- | sql/mysql_priv.h | 4 | ||||
-rw-r--r-- | sql/mysqld.cc | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index 880bccdd67e..411be5a9d20 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -158,12 +158,12 @@ deinit_event_thread(THD *thd) DBUG_PRINT("exit", ("Event thread finishing")); pthread_mutex_lock(&LOCK_thread_count); thread_count--; - delete thd; - pthread_cond_broadcast(&COND_thread_count); - pthread_mutex_unlock(&LOCK_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,12 +421,12 @@ Event_scheduler::start() net_end(&new_thd->net); pthread_mutex_lock(&LOCK_thread_count); thread_count--; - delete new_thd; - pthread_cond_broadcast(&COND_thread_count); - pthread_mutex_unlock(&LOCK_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); } end: UNLOCK_DATA(); @@ -556,12 +556,12 @@ error: net_end(&new_thd->net); pthread_mutex_lock(&LOCK_thread_count); thread_count--; - delete new_thd; - pthread_cond_broadcast(&COND_thread_count); - pthread_mutex_unlock(&LOCK_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); } delete event_name; DBUG_RETURN(TRUE); diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 0caf3197fb8..b816f692320 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -86,9 +86,9 @@ typedef ulong nesting_map; /* Used for flags of nesting constructs */ typedef ulonglong nested_join_map; /* query_id */ -typedef int64 query_id_t; +typedef uint64 query_id_t; extern query_id_t global_query_id; -extern int32 thread_running; +extern uint32 thread_running; extern my_atomic_rwlock_t global_query_id_lock; /* increment query_id and return it. */ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index ddc6d53e019..253ed36ce31 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -532,7 +532,7 @@ uint delay_key_write_options, protocol_version; uint lower_case_table_names; uint tc_heuristic_recover= 0; uint volatile thread_count; -int32 thread_running; +uint32 thread_running; ulonglong thd_startup_options; ulong back_log, connect_timeout, concurrency, server_id; ulong table_cache_size, table_def_size; |