List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:March 25 2011 10:06pm
Subject:bzr commit into mysql-trunk branch (andrei.elkin:3327) Bug#11763265
View as plain text  
#At file:///home/andrei/MySQL/BZR/2a-23May/FIXES/bug11763265-55956-mysqlbinlog_raw_mode/ based on revid:georgi.kodinov@stripped

 3327 Andrei Elkin	2011-03-26
      bug#11763265 Potential bug with new --raw mode with mysqlbinlog
      There are two reported artifacts on possible operations with uninitialazed Log_event* pointer
      inside dump_remote_log_entries().
      In fact, under --raw mode only Load-data events generated by pre 5.0.3 servers is the valid issue.
      That relates to the assignment Load_log_event *le= (Load_log_event*)ev
      where rhs is not initialized when --raw.
      Rotate event is indeed handled correctly.
      Fixed with issuing an error if a pre-5.0.3 server sends LOAD_EVENT or CREATE_FILE_EVENT.
      There won't be any crash as well as no support for the referred events in combination with --raw.

=== modified file 'client/'
--- a/client/	2011-01-18 12:09:03 +0000
+++ b/client/	2011-03-25 22:06:40 +0000
@@ -1687,7 +1687,7 @@ static Exit_status dump_remote_log_entri
       if (type == ROTATE_EVENT)
-        Rotate_log_event *rev= (Rotate_log_event *)ev;
+        Rotate_log_event *rev= (Rotate_log_event *)ev; 
           If this is a fake Rotate event, and not about our log, we can stop
           transfer. If this a real Rotate event (so it's not about our log,
@@ -1783,6 +1783,11 @@ static Exit_status dump_remote_log_entri
+      if (raw_mode)
+      {
+        error("Can't handle LOAD_DATA events generated by prior to 5.0.3 servers");
+      }
       Load_log_event *le= (Load_log_event*)ev;
       const char *old_fname= le->fname;
       uint old_len= le->fname_len;

Attachment: [text/bzr-bundle] bzr/
bzr commit into mysql-trunk branch (andrei.elkin:3327) Bug#11763265Andrei Elkin25 Mar