On 4/19/11 10:07 AM, Jon Olav Hauglid wrote:
> #Atfile:///export/home/x/mysql-5.5-bug12346411/ based
> onrevid:serge.kozlov@stripped
>
> 3456 Jon Olav Hauglid 2011-04-19
> Bug#12346411 SQL/LOG.CC:6509: ASSERTION `PREPARED_XIDS> 0' FAILED
>
> This assert could be triggered during two phase commit if binary
> log was used as transaction coordinator log. The triggered assert
> checks that the same number of transaction IDs are processed in
> the prepare and commit phases.
>
> The reason it was triggered, was that the transaction consisted
> of an INSERT/UPDATE IGNORE that had an ignorable error. Since it
> had an error, no row log events were made and therefore
> prepared_xids was 0. However, since it was an IGNORE statement,
> the statement started a read/write statement transaction, committed
> it and completed successfully.
>
> This patch fixes the problem by adjusting the assert to take
> this possibility into account.
>
> Test case added to binlog.binlog_innodb_row.test.
>
OK to push.