List:Commits« Previous MessageNext Message »
From:Libing Song Date:October 21 2010 7:55am
Subject:Re: bzr commit into mysql-next-mr-bugfixing branch (Dao-Gang.Qu:3324)
Bug#55790
View as plain text  
Hi Daogang,
Nice work! 

Please find my review comments below.

STATUS
------
 
  Not Approved(The patch looks ok, but I have another option for the
bug).

REQUIRED CHANGES
----------------
No

REQUESTS
--------
There is another option for this bug.

=== modified file 'client/mysqlbinlog.cc'
--- client/mysqlbinlog.cc 2010-09-01 02:51:08 +0000
+++ client/mysqlbinlog.cc 2010-10-21 07:42:51 +0000
@@ -1469,6 +1469,18 @@
   rc= (remote_opt ? dump_remote_log_entries(&print_event_info,
logname) :
        dump_local_log_entries(&print_event_info, logname));
 
+  if (my_b_tell(&print_event_info.head_cache))
+  {
+    copy_event_cache_to_file_and_reinit(&print_event_info.head_cache,
+                                        result_file);
+    warning("The range of printed events ends with a row event or "
+            "a table map event that does not have the STMT_END_F "
+            "flag set. This might be because the last statement "
+            "was not fully written to the log, or because you are "
+            "using a --stop-position or --stop-datetime that refers "
+            "to an event in the middle of a statement. The partial "
+            "event has not been written to output.");
+  }

IMO, copy_event_cache_to_file_and_reinit() should be removed completely
from log_event.cc, as it is not log_event.cc's business.

And, it is simpler than this patch, even though I prefer the output
format that caused by this patch. 
# at 382
#101021 15:34:36 server id 1  end_log_pos 424 	Table_map: `test`.`t1` mapped to number 47
# at 424
#101021 15:34:36 server id 1  end_log_pos 2504 	Write_rows: table id 47 flags: STMT_END_F

The original output is:
# at 382
# at 424
#101021 15:34:36 server id 1  end_log_pos 424 	Table_map: `test`.`t1` mapped to number 47
#101021 15:34:36 server id 1  end_log_pos 2504 	Write_rows: table id 47 flags: STMT_END_F

SUGGESTIONS
-----------
No

DETAILS 
-------
On Tue, 2010-10-19 at 08:06 +0000, Dao-Gang.Qu@stripped wrote:
> #At file:///home/daogangqu/mysql/bzrwork1/bug55790/mysql-next-mr-bugfixing/ based on
> revid:dao-gang.qu@stripped
> 
>  3324 Dao-Gang.Qu@stripped	2010-10-19
>       Bug #55790  	Read_Master_Log_Pos is wrong after Slave_IO_Error=
> ER_NET_PACKET_TOO_LARGE
>       
>       When logging in row format, DML is written as a Table_map_event
>       followed by its row events. The Table_map_event is written to
>       the relay log by slave I/O thread even if its rows events are
>       discarded. But it is not displayed by MYSQLBINLOG. However,
>       the Read_Master_Log_Pos displayed by SHOW SLAVE STATUS is
>       at the end of the Table_map_Log_event.
>       
>       After the patch, the Table_map_log_event will be displayed by
Table_map_log_event's header
>       MYSQLBINLOG so long as it was written to the relay log even
>       if its rows events are discarded. To multi rows events in one
>       statement, the headers of other rows events also will be
>       displayed if the last rows event is discarded by slave I/O
>       thread. And MYSQLBINLOG will print a warning for the missed
>       rows event.
>     

-- 
Your Sincerely,
Libing Song
==================================
MySQL Replication Team
Software Engineer


Email : Li-Bing.Song@stripped
Skype : libing.song
MSN   : slb_database@stripped
Phone : +86 010-6505-4020 ext. 319
Mobile: +86 138-1144-2038
==================================

Thread
bzr commit into mysql-next-mr-bugfixing branch (Dao-Gang.Qu:3324) Bug#55790Dao-Gang.Qu19 Oct
  • Re: bzr commit into mysql-next-mr-bugfixing branch (Dao-Gang.Qu:3324)Bug#55790Sven Sandberg19 Oct
    • Re: bzr commit into mysql-next-mr-bugfixing branch (Dao-Gang.Qu:3324)Bug#55790Libing Song20 Oct
      • Re: bzr commit into mysql-next-mr-bugfixing branch (Dao-Gang.Qu:3324)Bug#55790Daogang Qu20 Oct
    • Re: bzr commit into mysql-next-mr-bugfixing branch (Dao-Gang.Qu:3324)Bug#55790Daogang Qu20 Oct
  • Re: bzr commit into mysql-next-mr-bugfixing branch (Dao-Gang.Qu:3324)Bug#55790Libing Song21 Oct
    • Re: bzr commit into mysql-next-mr-bugfixing branch (Dao-Gang.Qu:3324)Bug#55790Daogang Qu22 Oct