Commit 31d01ce3 authored by Mikael Ronstrom's avatar Mikael Ronstrom

WL#5138, review fixes

parent a8494872
......@@ -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);
......
......@@ -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. */
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment