List:Commits« Previous MessageNext Message »
From:Øystein Grøvlen Date:January 13 2011 7:50am
Subject:Re: bzr commit into mysql-trunk branch (roy.lyseng:3322) Bug#58561
View as plain text  
On 01/12/11 05:33 PM, Evgeny Potemkin wrote:
>> if (save_join_if_explain())
>> - DBUG_RETURN(1); /* purecov: inspected */
>> + {
>> + rc= 1;
>> + goto exit;
>> + }
>> if (item->engine_changed)
>> {
>> - DBUG_RETURN(1);
>> + rc= 1;
>> + goto exit;
>> }
> IMHO it would be more readable to write:
> if (save_join_if_explain() || item->engine_changed)
> {
>
> rc= 1;
> goto exit;
>
> }

I am not sure I agree. The first is a check for error status from a 
function, while the second is a check on the status of an object.  I 
think mixing such different type of tests makes the code less readable.

--
Øystein
Thread
bzr commit into mysql-trunk branch (roy.lyseng:3322) Bug#58561Roy Lyseng12 Jan
  • Re: bzr commit into mysql-trunk branch (roy.lyseng:3322) Bug#58561Evgeny Potemkin12 Jan
    • Re: bzr commit into mysql-trunk branch (roy.lyseng:3322) Bug#58561Øystein Grøvlen13 Jan
    • Re: bzr commit into mysql-trunk branch (roy.lyseng:3322) Bug#58561Roy Lyseng13 Jan