List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:April 21 2009 5:27pm
Subject:RE: bzr commit into mysql-6.0-falcon-team branch (vvaintroub:3131)
Bug#41840
View as plain text  

> -----Original Message-----
> From: Kevin.Lewis@stripped [mailto:Kevin.Lewis@stripped]
> Sent: Tuesday, April 21, 2009 4:26 PM
> To: Vladislav Vaintroub
> Cc: commits@stripped
> Subject: Re: bzr commit into mysql-6.0-falcon-team branch
> (vvaintroub:3131) Bug#41840
> 
> Vlad,
> 
> Good work here.  I have one question and a suggestion.
> 
> The suggestion is to use
>        else if (earlyWrite)
> instead of
>        else if (!earlyWrite)
> Switch them around so the code is testing the positive state instead of
> the negative.


Kevin, the code you're looking at ,would do nothing if (earlyWrite)

It might be a matter of personal preference, but I rather prefer

if (!condition)
{
  doSomething();
}

To 
if (condition)
{
  // do nothing
}
else
{
  doSomething();
}

for first alternative needs less typing and is visually more nicer;)

But thanks for suggestion anyway, I tried to simplify the conditions in the
last commit.

> The question is about the (control->version < srlVersion20) condition
> in
> SRLOverflowPages::pass2(void);
> 
>  > +		// We do not really know if this page  is on disk
>  > +		// or not, because early writeFlag is not available
>  > +		// Don't delete it during recovery, otherwise data
>  > +		// may be lost.
>  > +		log->setOverflowPageInvalid(pageNumber, tableSpaceId);
> 
> Does making this overflow page invalid keep it from being used?

Yes, they are not deleted in deleteOverflowPages.



Thread
bzr commit into mysql-6.0-falcon-team branch (vvaintroub:3131)Bug#41840Vladislav Vaintroub21 Apr
  • Re: bzr commit into mysql-6.0-falcon-team branch (vvaintroub:3131)Bug#41840Kevin Lewis21 Apr
    • RE: bzr commit into mysql-6.0-falcon-team branch (vvaintroub:3131)Bug#41840Vladislav Vaintroub21 Apr