List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:July 8 2010 2:47pm
Subject:Re: bzr commit into mysql-5.1-bugteam branch (jon.hauglid:3465)
View as plain text  
* Jon Olav Hauglid <Jon.Hauglid@stripped> [10/07/05 18:08]:
>  3465 Jon Olav Hauglid	2010-07-05
>       Bug #54734 assert in Diagnostics_area::set_ok_status

The patch is OK, please see a remark below.

> -      while (!(error=info.read_record(&info)) && !thd->killed)
> +      while (!thd->killed && !thd->is_error() &&
> !(error=info.read_record(&info)))
>        {
>          thd->examined_row_count++;
>  	if (!(select && select->skip_record()))

Instead of adding an extra condition to the loop, I suggest to 
rewrite this piece to check for thd->is_error() explicitly.

if (select != NULL)
  bool skip_record= select->skip_record();
  error= thd->is_error();

if (! skip_record)

It's a violation of calling convention that skip_record() does not
return a true/false for error.

Perhaps you should just fix skip_record() to follow the calling
convention instead?

bool skip_record(bool *skip_record)
  *skip_record= cond == NULL || cond->val_int();
  return thd->is_error();

If you're hesitant of changing 5.1, you coul do the above in 5.5

bzr commit into mysql-5.1-bugteam branch (jon.hauglid:3465) Bug#54734Jon Olav Hauglid5 Jul
  • Re: bzr commit into mysql-5.1-bugteam branch (jon.hauglid:3465)Bug#54734Konstantin Osipov8 Jul