List:Commits« Previous MessageNext Message »
From:Sven Sandberg Date:July 29 2008 7:00pm
Subject:Re: bzr commit into mysql-5.1 branch (hezx:2632) Bug#37051
View as plain text  
Ingo Strüwing wrote:
>> He Zhenxing wrote:
>>> #At file:///media/sda3/work/mysql/bzrwork/b37051/5.1-rpl-new/
>>>
>>>  2632 He Zhenxing    2008-07-25
>>>       BUG#37051 Replication rules not evaluated correctly
> ...
>> Please begin each test case with comments describing:
> ...
>>  - A list of related bugs (BUG#37051).
> 
> And please don't forget the synopsis/title.

I agree.

>> Please clean up (drop all tables and sync_slave_with_master) at the end
>> of the test.
> 
> Isn't there an include file that should be used to clean up replication
> tests?

Yes, include/master-slave-end.inc should be sourced, so that the slave 
is stopped. Also, all tables and other database objects must be dropped, 
and all variables must be reset to their old values.

>>> +      user_var_entry *var_entry= (user_var_entry
>>> *)hash_search(&thd->user_vars,
>>> +                                                               (const
>>> uchar *)name.str,
>>> +                                                              
>>> name.length);
>>> +      if (var_entry)
>>> +        table_map_for_update=
>>> (table_map)var_entry->val_int(&null_value);
> 
> After reading through the patch once, I wondered if we don't need to
> distinguish between old masters, where we still need to analyze the
> tables in the slave, and new masters, that send the map of update tables.
>
> Do I understand the patch correctly in so far that the assignment above
> simply overrides the analyze done by the server, if the master sent a
> table map?

As I understand it, the old code for checking replication rules is in 
sql_parse.cc just below the patch. This code is guarded by 
lex->sql_command!=SQLCOM_MULTI_UPDATE. Hence, before the patch, 
multi-table UPDATE statements were simply not checked for replication 
rules. The new case introduced by the patch is guarded by 
lex->sql_command==SQLCOM_MULTI_UPDATE. So no query executes both checks.

> If yes, would there be savings if we skip the analyze in case we have
> the map from the master?
> 
> ...
> 
> Regards
> Ingo

-- 
Sven Sandberg, Software Engineer
MySQL AB, www.mysql.com
Thread
bzr commit into mysql-5.1 branch (hezx:2632) Bug#37051He Zhenxing25 Jul
  • Re: bzr commit into mysql-5.1 branch (hezx:2632) Bug#37051Sven Sandberg28 Jul
    • Re: bzr commit into mysql-5.1 branch (hezx:2632) Bug#37051He Zhenxing29 Jul
    • Re: bzr commit into mysql-5.1 branch (hezx:2632) Bug#37051Ingo Strüwing29 Jul
      • Re: bzr commit into mysql-5.1 branch (hezx:2632) Bug#37051Sven Sandberg29 Jul
        • Re: bzr commit into mysql-5.1 branch (hezx:2632) Bug#37051He Zhenxing30 Jul
      • Re: bzr commit into mysql-5.1 branch (hezx:2632) Bug#37051He Zhenxing30 Jul