Hi Zhenxing,
He Zhenxing wrote:
> #At file:///media/sda3/work/mysql/bzrwork/semisync/6.0-rpl-merge-new/
>
> 2688 He Zhenxing 2008-09-20
> Apply patch of WL#4398 to mysql-6.0-rpl-merge
[..]
> === modified file 'sql/transaction.cc'
> --- a/sql/transaction.cc 2008-08-12 22:30:55 +0000
> +++ b/sql/transaction.cc 2008-09-20 09:17:36 +0000
> @@ -20,6 +20,7 @@
>
> #include "transaction.h"
> #include "mysql_priv.h"
> +#include "rpl_handler.h"
>
> #ifdef WITH_MARIA_STORAGE_ENGINE
> #include "../storage/maria/ha_maria.h"
> @@ -192,6 +193,13 @@ bool trans_commit_stmt(THD *thd)
> int res= FALSE;
> if (thd->transaction.stmt.ha_list)
> res= ha_commit_trans(thd, FALSE);
> + else
> + {
> + /* call hooks for statement commit of non-transactional tables,
> + for transactional tables, the hooks will be called in
> + ha_commit_trans */
> + RUN_HOOK(transaction, after_commit, (thd, FALSE));
Why it's necessary to call a after_commit hook if a commit wasn't
actually issued? Also please keep all hooks either in the ha_* interface
level or in the trans_*.
Regards,
-- Davi