List:Commits« Previous MessageNext Message »
From:Rafal Somla Date:April 15 2009 6:52am
Subject:Re: bzr commit into mysql-6.0-rpl branch (zhenxing.he:2841) Bug#38468
View as plain text  
He Zhenxing wrote:
>> REQUESTS
>> --------
>>
>> 1. You extend mysqlbinlog.test but I don't see the corresponding changes in the 
>> result file (forgot to --record new results?). This should be fixed.
>>
> 
> The test code I added does not generate any output in the result file, I
> did this on purpose, the 'diff_files' line checks weather this part of
> the test passed or not.
>

Right, now I noticed the disable_query_log directive. In that case patch is ok 
to push.

>> SUGGESTIONS
>> -----------
>>
>> 2. Declare **defaults_argv as static variable to discourage its use from other 
>> modules.
>> 3. I don't like that main() is using defaults_argv variable which is not 
>> assigned within it. This obscures the logic and makes code harder to 
>> understand/maintain. I suggest to go around this by declaring a new function 
>> with the following specification:
>>
>>   /**
>>     @function free_args()
>>
>>     @short Frees memory allocated by parse_args(). Should be always called after
>>     a call to parse_args().
>>   */
>>
>> Then this function would be called from within main(). Of course you still need 
>> a global variable to communicate between free_args() and parse_args(), but the 
>> use of that variable would be limited to these two functions and this will be 
>> easier to understand.
>>
> 
> I am thinking about another way now, moving the load_defaults out of
> parse_args() to main(), so that we do not need to make defaults_argv
> global.
>

Looks good.

Rafal


Thread
bzr commit into mysql-6.0-rpl branch (zhenxing.he:2841) Bug#38468He Zhenxing14 Apr
  • Re: bzr commit into mysql-6.0-rpl branch (zhenxing.he:2841) Bug#38468Rafal Somla14 Apr
    • Re: bzr commit into mysql-6.0-rpl branch (zhenxing.he:2841) Bug#38468He Zhenxing15 Apr
      • Re: bzr commit into mysql-6.0-rpl branch (zhenxing.he:2841) Bug#38468Rafal Somla15 Apr
  • Re: bzr commit into mysql-6.0-rpl branch (zhenxing.he:2841) Bug#38468Luís Soares17 Apr
    • Re: bzr commit into mysql-6.0-rpl branch (zhenxing.he:2841) Bug#38468He Zhenxing20 Apr