Ingo Strüwing wrote:
> Hi Zhenxing, Sven,
>
> you know I'm not exactly a key expert in replication. But due to great
> explanations in the bug report, I believe to have some understanding of
> the issue.
>
> I know there is an upcoming new patch and I'll be second reviewer for it
> too unless someone else takes over. Anyway, I looked into this patch to
> see if I can do at least sort of a review.
>
> I have nothing to add to Sven's review, but please answer my below
> questions.
>
> Sven Sandberg, 28.07.2008 17:56:
> ...
> > 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.
>
sure
> ...
> > 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?
>
Sven suggested master-slave-end.inc, but it only sync slave with master
and stop master, it does not clean up tables or other objects. So I will
drop all tables and then include master-slave-end.inc to do cleanup on
slave.
> ...
> >> + 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?
>
> If yes, would there be savings if we skip the analyze in case we have
> the map from the master?
>
right, when replicating from new masters, the slave will evaluate the
filter rules twice, should add a check to avoid the second check when
the map from master is available.
> ...
>
> Regards
> Ingo