MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:andrey Date:May 21 2007 8:51am
Subject:bk commit into 5.1 tree (andrey:1.2530) BUG#28075
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of andrey. When andrey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-05-21 10:51:11+02:00, andrey@stripped +4 -0
  Fix for bug#28075 COM_DEBUG crashes mysqld
  
  Uninitialized in the constructor member variables were
  pointing to nirvana and causing a crash when debug information
  of the Event Scheduler was dumped in result to COM_DEBUG
  packet sent to the server.

  sql/event_queue.cc@stripped, 2007-05-21 10:49:51+02:00, andrey@stripped +11 -4
    Initialize member variables or they will point to
    nirvana and could possible cause a crash during
    dumping of debug information.

  sql/event_queue.h@stripped, 2007-05-21 10:49:51+02:00, andrey@stripped +0 -1
    remove unneeded line

  sql/event_scheduler.cc@stripped, 2007-05-21 10:49:51+02:00, andrey@stripped +7 -2
    Initialize member variables or they will point to
    nirvana and could possible cause a crash during
    dumping of debug information.

  sql/event_scheduler.h@stripped, 2007-05-21 10:49:51+02:00, andrey@stripped +1 -2
    remove unneeded state

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	andrey
# Host:	whirlpool.mysql.com
# Root:	/work/mysql-5.1-runtime

--- 1.33/sql/event_queue.cc	2007-04-27 19:03:48 +02:00
+++ 1.34/sql/event_queue.cc	2007-05-21 10:49:51 +02:00
@@ -70,10 +70,14 @@
 */
 
 Event_queue::Event_queue()
-  :mutex_last_locked_at_line(0), mutex_last_unlocked_at_line(0),
+  :next_activation_at(0),
+   mutex_last_locked_at_line(0),
+   mutex_last_unlocked_at_line(0),
+   mutex_last_locked_in_func("n/a"),
+   mutex_last_unlocked_in_func("n/a"),
+   mutex_last_attempted_lock_in_func("n/a"),
    mutex_last_attempted_lock_at_line(0),
    mutex_queue_data_locked(FALSE),
-   next_activation_at(0),
    mutex_queue_data_attempting_lock(FALSE)
 {
   mutex_last_unlocked_in_func= mutex_last_locked_in_func=
@@ -739,8 +743,11 @@
 
   MYSQL_TIME time;
   my_tz_UTC->gmt_sec_to_TIME(&time, next_activation_at);
-  printf("Next activation : %04d-%02d-%02d %02d:%02d:%02d\n",
-         time.year, time.month, time.day, time.hour, time.minute, time.second);
+  if (time.year != 1970)
+    printf("Next activation : %04d-%02d-%02d %02d:%02d:%02d\n",
+           time.year, time.month, time.day, time.hour, time.minute, time.second);
+  else
+    printf("Next activation : never");
 
   DBUG_VOID_RETURN;
 }

--- 1.17/sql/event_queue.h	2007-04-05 13:24:29 +02:00
+++ 1.18/sql/event_queue.h	2007-05-21 10:49:51 +02:00
@@ -104,7 +104,6 @@
   bool mutex_queue_data_locked;
   bool mutex_queue_data_attempting_lock;
   bool waiting_on_cond;
-
 };
 
 #endif /* _EVENT_QUEUE_H_ */

--- 1.43/sql/event_scheduler.cc	2007-04-13 22:35:53 +02:00
+++ 1.44/sql/event_scheduler.cc	2007-05-21 10:49:51 +02:00
@@ -42,7 +42,6 @@
 static
 const LEX_STRING scheduler_states_names[] =
 {
-  { C_STRING_WITH_LEN("UNINITIALIZED") },
   { C_STRING_WITH_LEN("INITIALIZED") },
   { C_STRING_WITH_LEN("RUNNING") },
   { C_STRING_WITH_LEN("STOPPING") }
@@ -331,9 +330,15 @@
 
 
 Event_scheduler::Event_scheduler(Event_queue *queue_arg)
-  :state(UNINITIALIZED),
+  :state(INITIALIZED),
   scheduler_thd(NULL),
   queue(queue_arg),
+  mutex_last_locked_at_line(0),
+  mutex_last_unlocked_at_line(0),
+  mutex_last_locked_in_func("n/a"),
+  mutex_last_unlocked_in_func("n/a"),
+  mutex_scheduler_data_locked(FALSE),
+  waiting_on_cond(FALSE),
   started_events(0)
 {
   pthread_mutex_init(&LOCK_scheduler_state, MY_MUTEX_INIT_FAST);

--- 1.22/sql/event_scheduler.h	2007-04-05 13:24:29 +02:00
+++ 1.23/sql/event_scheduler.h	2007-05-21 10:49:51 +02:00
@@ -111,8 +111,7 @@
 
   enum enum_state
   {
-    UNINITIALIZED = 0,
-    INITIALIZED,
+    INITIALIZED = 0,
     RUNNING,
     STOPPING
   };
Thread
bk commit into 5.1 tree (andrey:1.2530) BUG#28075andrey21 May