Below is the list of changes that have just been committed into a local
5.1 repository of emurphy. When emurphy does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1999 05/12/02 01:11:49 elliot@stripped +3 -0
BUG#15406: Adding support for transactions to blackhole.
Now when rolling back a transaction on a blackhole table,
the transaction will not be written to the binlog.
mysql-test/r/blackhole.result
1.6 05/12/02 01:09:28 elliot@stripped +25 -0
updated test results for transaction support
mysql-test/t/blackhole.test
1.5 05/12/02 01:09:18 elliot@stripped +17 -0
Added a test for transaction support
sql/ha_blackhole.h
1.7 05/12/02 01:09:03 elliot@stripped +1 -0
Added support for transactions
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: elliot
# Host: dl145k.mysql.com
# Root: /users/emurphy/src/mysql-5.1-new
--- 1.5/mysql-test/r/blackhole.result 2005-05-05 14:20:45 +02:00
+++ 1.6/mysql-test/r/blackhole.result 2005-12-02 01:09:28 +01:00
@@ -110,16 +110,41 @@
master-bin.000001 # Query 1 # use `test`; drop table t1,t2
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackhole
master-bin.000001 # Query 1 # use `test`; delete from t1 where a=10
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; update t1 set a=11 where a=15
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; insert into t1 values(1)
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; insert ignore into t1 values(1)
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; replace into t1 values(100)
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; create table t2 (a varchar(200))
engine=blackhole
master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
master-bin.000001 # Execute_load_query 1 # use `test`; load data infile
'../../std_data/words.dat' into table t2 ;file_id=1
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; alter table t1 add b int
master-bin.000001 # Query 1 # use `test`; alter table t1 drop b
master-bin.000001 # Query 1 # use `test`; create table t3 like t1
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t3
+master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; replace into t1 select * from t3
+master-bin.000001 # Query 1 # use `test`; COMMIT
drop table t1,t2,t3;
+reset master;
+create table t1 (a int) engine=blackhole;
+set autocommit=0;
+start transaction;
+insert into t1 values(1);
+commit;
+start transaction;
+insert into t1 values(2);
+rollback;
+set autocommit=1;
+show binlog events;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
+master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackhole
+master-bin.000001 # Query 1 # use `test`; BEGIN
+master-bin.000001 # Query 1 # use `test`; insert into t1 values(1)
+master-bin.000001 # Query 1 # use `test`; COMMIT
--- 1.4/mysql-test/t/blackhole.test 2005-07-28 02:21:39 +02:00
+++ 1.5/mysql-test/t/blackhole.test 2005-12-02 01:09:18 +01:00
@@ -127,3 +127,20 @@
drop table t1,t2,t3;
# End of 4.1 tests
+
+# Test that a transaction which is rolled back does not go into binlog
+# and that a transaction which is committed does
+
+reset master;
+create table t1 (a int) engine=blackhole;
+set autocommit=0;
+start transaction;
+insert into t1 values(1);
+commit;
+start transaction;
+insert into t1 values(2);
+rollback;
+set autocommit=1;
+--replace_result $VERSION VERSION
+--replace_column 2 # 5 #
+show binlog events;
--- 1.6/sql/ha_blackhole.h 2005-11-23 21:44:54 +01:00
+++ 1.7/sql/ha_blackhole.h 2005-12-02 01:09:03 +01:00
@@ -84,4 +84,5 @@
THR_LOCK_DATA **store_lock(THD *thd,
THR_LOCK_DATA **to,
enum thr_lock_type lock_type);
+ bool has_transactions() { return 1; }
};
| Thread |
|---|
| • bk commit into 5.1 tree (elliot:1.1999) BUG#15406 | Elliot Murphy | 2 Dec |