List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:March 5 2009 6:09am
Subject:Re: bzr commit into mysql-5.1-bugteam branch (zhou.li:2825) Bug#39858
View as plain text  
Hi Leonard,

Patch looks good, see inline comments!

Leonard Zhou wrote:
> #At file:///home/zhl/mysql/rep/5.1/bug39858/
> 
>  2825 Leonard Zhou	2009-03-05
>       BUG#39858 rpl.prl_rotate(rpl.rpl_rotate_logs) failed on pushbuild: result
> mismatch
>       
>       The new purge time is not always later than the last modify time of
> master-bin.000002 in windows platform,
>       So we can't sure master-bin.000002 is always deleted in any platform.
>       

This description is not clear, please rewrite it.

>       Change the new purge time to '1 second later than the last modify time of
> master-bin.000002.
>       That can sure we can always delete that file in any platform.
> modified:
>   mysql-test/suite/rpl/r/rpl_rotate_logs.result
>   mysql-test/suite/rpl/t/rpl_rotate_logs.test
> 
> per-file messages:
>   mysql-test/suite/rpl/r/rpl_rotate_logs.result
>     Test result
>   mysql-test/suite/rpl/t/rpl_rotate_logs.test
>     Change purge time
> === modified file 'mysql-test/suite/rpl/r/rpl_rotate_logs.result'
> --- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result	2008-01-14 07:38:02 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result	2009-03-05 03:28:36 +0000
> @@ -87,9 +87,7 @@ show binary logs;
>  Log_name	File_size
>  master-bin.000002	#
>  master-bin.000003	#
> -select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND)
> -from information_schema.tables
> -where TABLE_SCHEMA="test" and TABLE_NAME="t2";
> +SELECT @time_for_purge:=DATE_ADD('tmpval', INTERVAL 1 SECOND);
>  purge master logs before (@time_for_purge);
>  show binary logs;
>  Log_name	File_size
> 
> === modified file 'mysql-test/suite/rpl/t/rpl_rotate_logs.test'
> --- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test	2008-02-28 11:21:44 +0000
> +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test	2009-03-05 03:28:36 +0000
> @@ -112,14 +112,31 @@ source include/show_master_logs.inc;
>  purge binary logs to 'master-bin.000002';
>  source include/show_binary_logs.inc;
>  
> -# Calculate time to use in "purge master logs before" by taking
> -# last modification time of t2 and adding 1 second
> -# This is donw in order to handle the case where file system
> -# time differs from mysqld's time
> +# Set the purge time 1 second after the last modify time of master-bin.000002.
> +let $MYSQLD_DATADIR= `select @@datadir`;
> +--exec stat $MYSQLD_DATADIR/master-bin.000002 >$MYSQLTEST_VARDIR/tmp/purge000002
> +--exec echo > $MYSQLTEST_VARDIR/tmp/purge000003

I'd suggest to name the temp files after the test name to avoid conflict
with other tests.

> +perl;
> +open F, $ENV{'MYSQLTEST_VARDIR'}.'/tmp/purge000002' or die "Tmp file not found";
> +open F2, ">>".$ENV{'MYSQLTEST_VARDIR'}.'/tmp/purge000003' or die "Tmp file not
> found";

include the filename in the error messages.

> +while (<F>)
> +{
> +  if (/Modify: ([^ ]*) ([^ ]*)\./)
> +  {
> +    printf F2 ("let \$tmpval = %s %s;",$1,$2);
> +  }
> +}
> +close F;
> +close F2;
> +EOF
> +
> +--source $MYSQLTEST_VARDIR/tmp/purge000003
> +remove_file $MYSQLTEST_VARDIR/tmp/purge000002;
> +remove_file $MYSQLTEST_VARDIR/tmp/purge000003;
> +
>  --disable_result_log
> -select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND)
> -  from information_schema.tables
> -    where TABLE_SCHEMA="test" and TABLE_NAME="t2";
> +--replace_result $tmpval tmpval
> +--eval SELECT @time_for_purge:=DATE_ADD('$tmpval', INTERVAL 1 SECOND)
>  --enable_result_log
>  
>  purge master logs before (@time_for_purge);
> 
> 

Thread
bzr commit into mysql-5.1-bugteam branch (zhou.li:2825) Bug#39858Leonard Zhou5 Mar
  • Re: bzr commit into mysql-5.1-bugteam branch (zhou.li:2825) Bug#39858He Zhenxing5 Mar
    • Re: bzr commit into mysql-5.1-bugteam branch (zhou.li:2825) Bug#39858Alfranio Correia10 Mar