List:Commits« Previous MessageNext Message »
From:Sven Sandberg Date:October 22 2007 6:05pm
Subject:bk commit into 5.1 tree (sven:1.2575) BUG#31581
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of sven. When sven 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-10-22 20:05:21+02:00, sven@murkla.(none) +3 -0
  BUG#31581 5.1-telco-6.1 -> 5.1.22. Slave crashes during starting
  
  Added an extra argument `Log_event_type event_type' to the constructors
  {Write|Update|Delete}_rows_log_event(const char *buf...), because the
  constructor may be called from the constructor of the corresponding subclass
  {Write|Update|Delete}_rows_log_event_old(const char *buf...), in which case
  another entry from description_event->post_header_len must be read.

  sql/log_event.cc@stripped, 2007-10-22 20:05:15+02:00, sven@murkla.(none) +11 -7
    In Log_event::read_log_event: added the new parameter to all calls to the
    modified constructor of {Write|Update|Delete}_rows_log_event.
    
    In constructor Rows_log_event(const char *buf...), check allow
    event_type==PRE_GA_UPDATE_ROWS_EVENT and treat it as UPDATE_ROWS_EVENT in the
    if () condition.
    
    In constructors {Write|Update|Delete}_rows_log_event(const char *buf...): added
    the extra parameter `Log_event_type event_type' and pass it on to the
    constructor of the parent class.

  sql/log_event.h@stripped, 2007-10-22 20:05:15+02:00, sven@murkla.(none) +4 -1
    Added `Log_event_type event_type' as an argument to the constructors
    {Write|Update|Delete}_rows_log_event(const char *buf...)

  sql/log_event_old.h@stripped, 2007-10-22 20:05:15+02:00, sven@murkla.(none) +3 -3
    Call the constructor {Write|Update|Delete}_rows_log_event with the new extra
    argument.

diff -Nrup a/sql/log_event.cc b/sql/log_event.cc
--- a/sql/log_event.cc	2007-10-13 22:12:46 +02:00
+++ b/sql/log_event.cc	2007-10-22 20:05:15 +02:00
@@ -1017,13 +1017,13 @@ Log_event* Log_event::read_log_event(con
     ev = new Delete_rows_log_event_old(buf, event_len, description_event);
     break;
   case WRITE_ROWS_EVENT:
-    ev = new Write_rows_log_event(buf, event_len, description_event);
+    ev = new Write_rows_log_event(buf, event_len, WRITE_ROWS_EVENT, description_event);
     break;
   case UPDATE_ROWS_EVENT:
-    ev = new Update_rows_log_event(buf, event_len, description_event);
+    ev = new Update_rows_log_event(buf, event_len, UPDATE_ROWS_EVENT, description_event);
     break;
   case DELETE_ROWS_EVENT:
-    ev = new Delete_rows_log_event(buf, event_len, description_event);
+    ev = new Delete_rows_log_event(buf, event_len, DELETE_ROWS_EVENT, description_event);
     break;
   case TABLE_MAP_EVENT:
     ev = new Table_map_log_event(buf, event_len, description_event);
@@ -5786,7 +5786,8 @@ Rows_log_event::Rows_log_event(const cha
 
   m_cols_ai.bitmap= m_cols.bitmap; /* See explanation in is_valid() */
 
-  if (event_type == UPDATE_ROWS_EVENT)
+  if (event_type == UPDATE_ROWS_EVENT ||
+      event_type == PRE_GA_UPDATE_ROWS_EVENT)
   {
     DBUG_PRINT("debug", ("Reading from %p", ptr_after_width));
 
@@ -7018,9 +7019,10 @@ Write_rows_log_event::Write_rows_log_eve
  */
 #ifdef HAVE_REPLICATION
 Write_rows_log_event::Write_rows_log_event(const char *buf, uint event_len,
+                                           Log_event_type event_type,
                                            const Format_description_log_event
                                            *description_event)
-: Rows_log_event(buf, event_len, WRITE_ROWS_EVENT, description_event)
+: Rows_log_event(buf, event_len, event_type, description_event)
 {
 }
 #endif
@@ -7758,9 +7760,10 @@ Delete_rows_log_event::Delete_rows_log_e
  */
 #ifdef HAVE_REPLICATION
 Delete_rows_log_event::Delete_rows_log_event(const char *buf, uint event_len,
+                                             Log_event_type event_type,
                                              const Format_description_log_event
                                              *description_event)
-  : Rows_log_event(buf, event_len, DELETE_ROWS_EVENT, description_event)
+  : Rows_log_event(buf, event_len, event_type, description_event)
 {
 }
 #endif
@@ -7886,10 +7889,11 @@ Update_rows_log_event::~Update_rows_log_
  */
 #ifdef HAVE_REPLICATION
 Update_rows_log_event::Update_rows_log_event(const char *buf, uint event_len,
+                                             Log_event_type event_type,
                                              const
                                              Format_description_log_event
                                              *description_event)
-  : Rows_log_event(buf, event_len, UPDATE_ROWS_EVENT, description_event)
+  : Rows_log_event(buf, event_len, event_type, description_event)
 {
 }
 #endif
diff -Nrup a/sql/log_event.h b/sql/log_event.h
--- a/sql/log_event.h	2007-10-01 11:25:25 +02:00
+++ b/sql/log_event.h	2007-10-22 20:05:15 +02:00
@@ -2406,7 +2406,8 @@ public:
 		       MY_BITMAP const *cols, bool is_transactional);
 #endif
 #ifdef HAVE_REPLICATION
-  Write_rows_log_event(const char *buf, uint event_len, 
+  Write_rows_log_event(const char *buf, uint event_len,
+                       Log_event_type event_type,
                        const Format_description_log_event *description_event);
 #endif
 #if !defined(MYSQL_CLIENT) 
@@ -2476,6 +2477,7 @@ public:
 
 #ifdef HAVE_REPLICATION
   Update_rows_log_event(const char *buf, uint event_len, 
+                        Log_event_type event_type,
 			const Format_description_log_event *description_event);
 #endif
 
@@ -2546,6 +2548,7 @@ public:
 #endif
 #ifdef HAVE_REPLICATION
   Delete_rows_log_event(const char *buf, uint event_len, 
+                        Log_event_type event_type,
 			const Format_description_log_event *description_event);
 #endif
 #if !defined(MYSQL_CLIENT) 
diff -Nrup a/sql/log_event_old.h b/sql/log_event_old.h
--- a/sql/log_event_old.h	2007-09-10 13:15:59 +02:00
+++ b/sql/log_event_old.h	2007-10-22 20:05:15 +02:00
@@ -121,7 +121,7 @@ public:
 #if defined(HAVE_REPLICATION)
   Write_rows_log_event_old(const char *buf, uint event_len,
                            const Format_description_log_event *descr)
-    : Write_rows_log_event(buf, event_len, descr)
+    : Write_rows_log_event(buf, event_len, PRE_GA_WRITE_ROWS_EVENT, descr)
   {
   }
 #endif
@@ -168,7 +168,7 @@ public:
 #if defined(HAVE_REPLICATION)
   Update_rows_log_event_old(const char *buf, uint event_len, 
                             const Format_description_log_event *descr)
-    : Update_rows_log_event(buf, event_len, descr),
+    : Update_rows_log_event(buf, event_len, PRE_GA_UPDATE_ROWS_EVENT, descr),
       m_after_image(NULL), m_memory(NULL)
   {
   }
@@ -215,7 +215,7 @@ public:
 #if defined(HAVE_REPLICATION)
   Delete_rows_log_event_old(const char *buf, uint event_len,
                             const Format_description_log_event *descr)
-    : Delete_rows_log_event(buf, event_len, descr),
+    : Delete_rows_log_event(buf, event_len, PRE_GA_DELETE_ROWS_EVENT, descr),
       m_after_image(NULL), m_memory(NULL)
   {
   }
Thread
bk commit into 5.1 tree (sven:1.2575) BUG#31581Sven Sandberg23 Oct