List:Commits« Previous MessageNext Message »
From:Gleb Shchepa Date:April 9 2010 5:06pm
Subject:Re: bzr commit into mysql-5.1-bugteam branch (joro:3449) Bug#43594
View as plain text  
Hello Georgi,

You fix is mostly ok, but please see my comments below.

Thank you,
Gleb.

Georgi Kodinov wrote:
> #At file:///home/kgeorge/mysql/work/B43594-5.1-bugteam/ based on
> revid:omer@stripped
> 
>  3449 Georgi Kodinov	2010-04-08
>       Bug #43594: mysqlhotcopy does not ignore log tables and others in mysql
> database
>       
>       Added a filter to mysqlhotcopy to filter out the same tables in the 'mysql' 
>       database that mysqldump filters out.
> 
>     modified:
>       scripts/mysqlhotcopy.sh
> === modified file 'scripts/mysqlhotcopy.sh'
> --- a/scripts/mysqlhotcopy.sh	2009-04-28 16:16:17 +0000
> +++ b/scripts/mysqlhotcopy.sh	2010-04-08 13:23:54 +0000
> @@ -267,6 +267,16 @@ foreach my $rdb ( @db_desc ) {
>      my $db = $rdb->{src};
>      my @dbh_tables = get_list_of_tables( $db );
>  
> +    ## filter out certain system non-lockable tables. 
> +    ## keep in sync with mysqldump.
> +    if ($db =~ m/mysql/i)

This RE matches not only variations of "mysql" but also a substring of "abcmysqlqwe" etc.
It is better to use /^mysql$/i.
Same issues for table name below.

> +    {
> +      @dbh_tables = grep { $_ !~ 'apply_status' } @dbh_tables;
> +      @dbh_tables = grep { $_ !~ 'schema' } @dbh_tables;
> +      @dbh_tables = grep { $_ !~ 'general_log' } @dbh_tables;
> +      @dbh_tables = grep { $_ !~ 'slow_log' } @dbh_tables;
> +    }
> +
>      ## generate regex for tables/files
>      my $t_regex;
>      my $negated;
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 

Thread
bzr commit into mysql-5.1-bugteam branch (joro:3449) Bug#43594Georgi Kodinov8 Apr
  • Re: bzr commit into mysql-5.1-bugteam branch (joro:3449) Bug#43594Gleb Shchepa9 Apr