List:Commits« Previous MessageNext Message »
From:Mikael Ronstrom Date:November 20 2009 3:43pm
Subject:bzr commit into mysql-5.6-next-mr branch (mikael:2925) WL#5138
View as plain text  
#At file:///home/mikael/mysql_clones/mysql-next-mr-WL5138/ based on revid:mikael@stripped

 2925 Mikael Ronstrom	2009-11-20
      WL#5138, review fixes

    modified:
      sql/event_scheduler.cc
      sql/mysql_priv.h
      sql/mysqld.cc
=== modified file 'sql/event_scheduler.cc'
--- a/sql/event_scheduler.cc	2009-11-20 15:23:32 +0000
+++ b/sql/event_scheduler.cc	2009-11-20 15:43:21 +0000
@@ -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);

=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h	2009-11-20 15:23:32 +0000
+++ b/sql/mysql_priv.h	2009-11-20 15:43:21 +0000
@@ -86,9 +86,9 @@ typedef ulong nesting_map;  /* Used for 
 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.  */

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-11-20 15:23:32 +0000
+++ b/sql/mysqld.cc	2009-11-20 15:43:21 +0000
@@ -532,7 +532,7 @@ uint delay_key_write_options, protocol_v
 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;


Attachment: [text/bzr-bundle] bzr/mikael@mysql.com-20091120154321-94kon925730im9sl.bundle
Thread
bzr commit into mysql-5.6-next-mr branch (mikael:2925) WL#5138Mikael Ronstrom20 Nov