List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:June 27 2008 1:45pm
Subject:Re: bzr push into mysql-6.0 branch (hezx:2683 to 2684) WL#4398
View as plain text  
* He Zhenxing <hezx@stripped> [08/06/27 13:59]:
>    /* If commit fails, we should be able to reset the OK status. */
>    thd->main_da.can_overwrite_status= TRUE;
> -  ha_autocommit_or_rollback(thd, thd->is_error());
> +  if (thd->transaction.stmt.ha_list)
> +  {
> +    ha_autocommit_or_rollback(thd, thd->is_error());
> +  }
> +  else
> +  {
> +    if (!thd->is_error())
> +      RUN_HOOK(transaction, after_commit, (thd, 0));
> +    else
> +      RUN_HOOK(transaction, after_rollback, (thd, 0));
> +  }
>    thd->main_da.can_overwrite_status= FALSE;

Please leave the dispatch_command as is.

ha_autocommit_or_rollback is called from an awful lot of places.

If you need to be running any hooks, you need to be running them
from within ha_autocommit_or_rollback().


-- 
Thread
bzr push into mysql-6.0 branch (hezx:2683 to 2684) WL#4398He Zhenxing27 Jun
  • Re: bzr push into mysql-6.0 branch (hezx:2683 to 2684) WL#4398Konstantin Osipov27 Jun
    • Re: bzr push into mysql-6.0 branch (hezx:2683 to 2684) WL#4398He Zhenxing27 Jun