Bug #15406 Blackhole engine should support transactions
Submitted: 2 Dec 2005 0:00 Modified: 18 Dec 2005 4:38
Reporter: Elliot Murphy Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.1 OS:
Assigned to: Elliot Murphy CPU Architecture:Any

[2 Dec 2005 0:00] Elliot Murphy
Description:
Brian has heard customer requests for blackhole to support transactions.
This means that if a transaction is rolled back on a blackhole table, the transaction should not be inserted in the binlog. Currently what happens is a warning is thrown and the transaction goes into the binlog anyway.

This is also needed as a first step to getting 2-phase commit support into blackhole which is needed to reproduce some bugs that were identified during a recent code review.

This change is trivial and has been sitting on my computer for far too long.

How to repeat:
reset master;
create table t1(a int) engine=blackhole;
set autocommit=0;
start transaction;
insert into t1 values(1);
rollback;
# observe that a warning is shown here
show warnings;
show binlog events;
# observe that the insert went to binlog even though the transaction was rolled back.

Suggested fix:
return 1 from has_transactions() in blackhole.
[2 Dec 2005 0:12] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/32940
[16 Dec 2005 20:15] Elliot Murphy
This change is in 5.1.4.
[18 Dec 2005 4:38] Paul DuBois
Noted in 5.1.4 changelog.