List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:September 29 2010 10:28am
Subject:Re: bzr commit into mysql-5.1-bugteam branch (alfranio.correia:3504)
Bug#55675
View as plain text  
Approved!

Alfranio Correia wrote:
> #At
> file:///home/acorreia/workspace.sun/repository.mysql.new/bzrwork/bug-55675/mysql-5.1-bugteam/
> based on revid:alfranio.correia@stripped
> 
>  3504 Alfranio Correia	2010-09-29 [merge]
>       BUG#55675 rpl.rpl_log_pos fails sporadically with error binlog truncated in the
> middle
>       
>       There are two calls to read_log_event() on master in mysql_binlog_send(),
>       each will read 19 bytes, and the error of the second read_log_event() will
>       be reported to slave.
>       
>       The second read_log_event() will start from position 94 (75 + 19) to 113
>       (75 + 19 + 19), the end position 113 is larger than the size 106 of binary
>       log that only have a FD, but because there is a call to mtr.suppression:
>       
>       call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when
> reading data from binary");
>       
>       which will write some binary events to the file, and so normally the
>       size of the binlog on master before slave connection will be large enough
>       for the second read_log_event(). 
>       
>       However, mysql_binlog_send() does not use the same IO_CACHE that is used to
> write 
>       into binary log (i.e. mysql_bin_log.log_file) for the hot binary log. It opens
>       the binary log file directly by calling open_binlog() and create a separated
>       IO_CACHE. So there is a possibily that after a master has flushed the binary
> log
>       file, the content has been cached by the filesystem, and has not yet updated
> the
>       on disk file yet. If this happens, then a slave will only see part of the
> file,
>       and thus the second read_log_event() will report event truncated error.
> 
>     modified:
>       mysql-test/suite/rpl/r/rpl_log_pos.result
>       mysql-test/suite/rpl/t/disabled.def
>       mysql-test/suite/rpl/t/rpl_log_pos.test
> === modified file 'mysql-test/suite/rpl/r/rpl_log_pos.result'
> --- a/mysql-test/suite/rpl/r/rpl_log_pos.result	2010-05-24 13:54:08 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result	2010-09-29 08:34:58 +0000
> @@ -5,23 +5,21 @@ reset slave;
>  drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
>  start slave;
>  call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading
> data from binary");
> -show master status;
> -File	Position	Binlog_Do_DB	Binlog_Ignore_DB
> -master-bin.000001	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
> +flush logs;
>  include/stop_slave.inc
> -change master to master_log_pos=MASTER_LOG_POS;
> +change master to master_log_file = 'MASTER_LOG_FILE',
> master_log_pos=MASTER_LOG_POS;
>  Read_Master_Log_Pos	75
>  start slave;
>  Last_IO_Error = Got fatal error 1236 from master when reading data from binary log:
> 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'
>  include/stop_slave.inc
>  show master status;
>  File	Position	Binlog_Do_DB	Binlog_Ignore_DB
> -master-bin.000001	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
> +master-bin.000002	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
>  create table if not exists t1 (n int);
>  drop table if exists t1;
>  create table t1 (n int);
>  insert into t1 values (1),(2),(3);
> -change master to master_log_pos=MASTER_LOG_POS;
> +change master to master_log_file = 'MASTER_LOG_FILE',
> master_log_pos=MASTER_LOG_POS;
>  start slave;
>  select * from t1 ORDER BY n;
>  n
> 
> === modified file 'mysql-test/suite/rpl/t/disabled.def'
> --- a/mysql-test/suite/rpl/t/disabled.def	2010-09-10 10:36:15 +0000
> +++ b/mysql-test/suite/rpl/t/disabled.def	2010-09-27 09:07:48 +0000
> @@ -11,4 +11,3 @@
>  ##############################################################################
>  
>  rpl_row_create_table : Bug#51574 Feb 27 2010 andrei failed different way than
> earlier with bug#45576
> -rpl_log_pos : BUG#55675 Sep 10 2010 27 2010 alfranio rpl.rpl_log_pos fails
> sporadically with error binlog truncated in the middle
> 
> === modified file 'mysql-test/suite/rpl/t/rpl_log_pos.test'
> --- a/mysql-test/suite/rpl/t/rpl_log_pos.test	2010-05-24 13:54:08 +0000
> +++ b/mysql-test/suite/rpl/t/rpl_log_pos.test	2010-09-29 08:34:58 +0000
> @@ -12,12 +12,13 @@
>  
>  source include/master-slave.inc;
>  call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading
> data from binary");
> -source include/show_master_status.inc;
> +
> +flush logs;
>  sync_slave_with_master;
> -source include/stop_slave.inc;
> +--source include/stop_slave.inc
>  
> ---replace_result 75 MASTER_LOG_POS
> -change master to master_log_pos=75;
> +--replace_result master-bin.000001 MASTER_LOG_FILE 75 MASTER_LOG_POS
> +change master to master_log_file = 'master-bin.000001', master_log_pos=75;
>  let $status_items= Read_Master_Log_Pos;
>  source include/show_slave_status.inc;
>  start slave;
> @@ -26,20 +27,20 @@ let $show_slave_io_error= 1;
>  source include/wait_for_slave_io_error.inc;
>  source include/stop_slave.inc;
>  
> -connection master;
> +--connection master
>  source include/show_master_status.inc;
>  create table if not exists t1 (n int);
>  drop table if exists t1;
>  create table t1 (n int);
>  insert into t1 values (1),(2),(3);
>  save_master_pos;
> -connection slave;
> ---replace_result 4 MASTER_LOG_POS
> -change master to master_log_pos=4;
> +--connection slave
> +--replace_result master-bin.000001 MASTER_LOG_FILE 4 MASTER_LOG_POS
> +change master to master_log_file = 'master-bin.000001', master_log_pos=4;
>  start slave;
>  sync_with_master;
>  select * from t1 ORDER BY n;
> -connection master;
> +--connection master
>  drop table t1;
>  sync_slave_with_master;
>  
> 
> text/bzr-bundle 类型 附件
> (bzr/alfranio.correia@stripped)
> # Bazaar merge directive format 2 (Bazaar 0.90)
> # revision_id: alfranio.correia@stripped\
> #   2p708q1r50v13zow
> # target_branch: file:///home/acorreia/workspace.sun\
> #   /repository.mysql.new/bzrwork/bug-55675/mysql-5.1-bugteam/
> # testament_sha1: 293273f1342f28facb7a4f2dc9dfc74bc8f3a3f5
> # timestamp: 2010-09-29 09:35:17 +0100
> # base_revision_id: alfranio.correia@stripped\
> #   na5jfk06xsokp91k
> # 
> # Begin bundle
> IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWdlqB/MABrTfgGAwWO///3/m
> 3gC////wYA4Ph6AAAAADoAAAAAAAAAA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3vR3myMja9r
> 8BR5NsTtPpN5xUUopsssUOCo9S5Sxwkn0iwvJHe4oM3GYJguV2JO1tdEGAfFgdDe+Sdr0YSZNym3
> LxN83yfcyc6THa3j7ZJscBwfiZRrQbhTelLK2Hrmx4MTBSKO50LlyljNZ8XYpqYMGTI9SjDCepxZ
> NCwpTcU7vkvWOypWEXMjMpUmozd7GL2s4VKpgi+Kd0lOjXOkflVKUpe/CJxbVQXMF7pElpxRrjEf
> Jdc1r3smU7Gt4qU6r3cuWfevZsTF1XosWLNcwZLo7EaMYvKTtWUvVHeuGDBio8lQdVDm4ptjoil0
> 1rknepIa3DY5mJ5o9imTepJtiWT3lXFM6hkucD1b4vmxrdTXH2M1kazUtGU2T6V7gpsNb+x+A9jG
> Q8Ccko1lSOR8ll0n9UqbHVQeDlLH0veua33Fl0molnJyWLKFJZTvXJ1ajtidWTnOMLpqcZz0msxK
> ildp8llzJ8hkLuSKcKEhstQP5g==
> 
> 


Thread
bzr commit into mysql-5.1-bugteam branch (alfranio.correia:3504) Bug#55675Alfranio Correia29 Sep
  • Re: bzr commit into mysql-5.1-bugteam branch (alfranio.correia:3504)Bug#55675He Zhenxing29 Sep
  • Re: bzr commit into mysql-5.1-bugteam branch (alfranio.correia:3504)Bug#55675He Zhenxing29 Sep