List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:January 29 2010 9:42am
Subject:Re: bzr commit into mysql-5.1-rep-semisync branch (Li-Bing.Song:3127)
Bug#50157
View as plain text  
Libing Song wrote:
> Hi Zhenxing,
> Thanks for your review.
> The new patch has been committed, please review again.
> 
> On Thu, 2010-01-28 at 12:07 +0800, He Zhenxing wrote:
> > > +
> > > +  TranxNode *allocate_node()
> > > +  {
> > > +    TranxNode *trx_node;
> > > +    Block *block= current_block;
> > > +
> > > +    if (last_node == BLOCK_TRANX_NODES-1)
> > > +    {
> > > +      current_block= current_block->next;
> > > +      last_node= -1;
> > > +    }
> > > +
> > > +    if (current_block == NULL && allocate_block())
> > > +    {
> > > +      current_block= block;
> > > +      if (current_block)
> > > +        last_node= BLOCK_TRANX_NODES-1;
> > > +      return NULL;
> > > +    }
> > > +
> > 
> > I'd suggest:
> > 
> > if (last_node == BLOCK_TRANX_NODES-1)
> > {
> >    if (current_block->next != NULL)
> >       current_block = current_block->next;
> >    else if (allocate_block())
> >       return NULL;
> >    last_node = -1;
> > }
>   'if (current_block == NULL && allocate_block())'
>   is still needed, for current_block is null when starting up.
> 

OK


> 
> 
> 


Thread
bzr commit into mysql-5.1-rep-semisync branch (Li-Bing.Song:3127) Bug#50157Li-Bing.Song27 Jan
  • Re: bzr commit into mysql-5.1-rep-semisync branch (Li-Bing.Song:3127)Bug#50157He Zhenxing28 Jan
    • Re: bzr commit into mysql-5.1-rep-semisync branch (Li-Bing.Song:3127)Bug#50157Libing Song29 Jan
      • Re: bzr commit into mysql-5.1-rep-semisync branch (Li-Bing.Song:3127)Bug#50157He Zhenxing29 Jan
  • Re: bzr commit into mysql-5.1-rep-semisync branch (Li-Bing.Song:3127)Bug#50157Luís Soares28 Jan
    • Re: bzr commit into mysql-5.1-rep-semisync branch (Li-Bing.Song:3127)Bug#50157Libing Song29 Jan
      • Re: bzr commit into mysql-5.1-rep-semisync branch (Li-Bing.Song:3127)Bug#50157Luís Soares29 Jan