List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:February 13 2009 2:21pm
Subject:Re: bzr commit into mysql-6.0-bugteam branch (luis.soares:3010)
Bug#23300
View as plain text  
Luís, hello.

The patch is okay. Considering one suggestion I made

>> > There is one more place in the code
>> > bool LOGGER::slow_log_print() referring to `opt_log_slow_slave_statements'
>> > 
>> >     if (thd->slave_thread && !opt_log_slow_slave_statements)
>> >       return 0;
>> > 
>> > rather than to `enable_slow_log'. That piece of code is actually
>> > completely extraneous because the caller of the function is to check
> `enable_slow_log'
>> > before to call the func.
>> > 
>> > I suggest to remove the referred snippet.
>> 
>> Hmm... I opted to keep this one. The opt_log_slow_slave_statements may
>> be used to enable disable from a regular connnection the slow query
>> logging for replication thread (as one seems to be able to do with
>> regular connections). Nevertheless, there seems to be some lack of
>> support for this in the opt_log_slow_slave_statements (as there is for
>> opt_slow_log).
>
> I mean, opt_slow_slave_statements is not dynamic.
>

Ok, I can stand it. 
We have two flags managing the execution flow control:

1.   if (thd->enable_slow_log) 
          slow_log_print()

2.   and inside  slow_log_print():

     if (thd->slave_thread && !opt_log_slow_slave_statements)
        return 0;

As 

   thd->enable_slow_log := opt_log_slow_slave_statements

`return 0' is impossible. If you don't like to remove then
you are better to assert that.


cheers,

Andrei

Thread
bzr commit into mysql-6.0-bugteam branch (luis.soares:3010) Bug#23300Luis Soares10 Feb 2009
  • Re: bzr commit into mysql-6.0-bugteam branch (luis.soares:3010)Bug#23300He Zhenxing11 Feb 2009
    • Re: bzr commit into mysql-6.0-bugteam branch (luis.soares:3010)Bug#23300Luís Soares13 Feb 2009
  • Re: bzr commit into mysql-6.0-bugteam branch (luis.soares:3010)Bug#23300Andrei Elkin11 Feb 2009
    • Re: bzr commit into mysql-6.0-bugteam branch (luis.soares:3010)Bug#23300Luís Soares13 Feb 2009
      • Re: bzr commit into mysql-6.0-bugteam branch (luis.soares:3010)Bug#23300Luís Soares13 Feb 2009
        • Re: bzr commit into mysql-6.0-bugteam branch (luis.soares:3010)Bug#23300Andrei Elkin13 Feb 2009