List:Internals« Previous MessageNext Message »
From:guilhem Date:April 26 2005 3:52pm
Subject:bk commit into 4.1 tree (gbichot:1.2207) BUG#10175
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of gbichot. When gbichot 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.2207 05/04/26 15:52:04 gbichot@stripped +2 -0
  checking that statements get into binlog even when they were affecting
  no rows of the blackhold engine (for this engine to be a binlog propagator).
  NOTE: blackhole.test currently hangs in 5.0 BUG#10175 so I'll merge without running this
test; the
  person who fixes the hang will correct the merged blackhole.result or ask me to).

  mysql-test/t/blackhole.test
    1.3 05/04/26 15:52:01 gbichot@stripped +29 -1
    checking that statements get into binlog even when they were affecting
    no rows of the blackhold engine. So that this engine can serve as
    a binlog propagator (A->B->C replication where B has only blackhole tables,
    B receives binlog from A, applies it to blackhole tables, writes statements
    to its binlog which it sends to C; both A and C have non-blackhole tables). B is just
a proxy.

  mysql-test/r/blackhole.result
    1.3 05/04/26 15:52:00 gbichot@stripped +40 -1
    result update

# 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:	gbichot
# Host:	quadita2.mysql.com
# Root:	/nfstmp1/guilhem/mysql-4.1-4ita

--- 1.2/mysql-test/r/blackhole.result	2005-03-25 01:07:54 +01:00
+++ 1.3/mysql-test/r/blackhole.result	2005-04-26 15:52:00 +02:00
@@ -83,4 +83,43 @@
 Only MyISAM tables	support collections
 select * from t1 where MATCH(a,b) AGAINST ("only");
 a	b
-drop table if exists t1,t2;
+reset master;
+drop table t1,t2;
+create table t1 (a int) engine=blackhole;
+delete from t1 where a=10;
+update t1 set a=11 where a=15;
+insert into t1 values(1);
+insert ignore into t1 values(1);
+replace into t1 values(100);
+create table t2 (a varchar(200)) engine=blackhole;
+load data infile '../../std_data/words.dat' into table t2;
+alter table t1 add b int;
+alter table t1 drop b;
+create table t3 like t1;
+insert into t1 select * from t3;
+replace into t1 select * from t3;
+select * from t1;
+a
+select * from t2;
+a
+select * from t3;
+a
+show binlog events;
+Log_name	Pos	Event_type	Server_id	Orig_log_pos	Info
+master-bin.000001	#	Start	1	#	Server ver: VERSION, Binlog ver: 3
+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`; update t1 set a=11 where a=15
+master-bin.000001	#	Query	1	#	use `test`; insert into t1 values(1)
+master-bin.000001	#	Query	1	#	use `test`; insert ignore into t1 values(1)
+master-bin.000001	#	Query	1	#	use `test`; replace into t1 values(100)
+master-bin.000001	#	Query	1	#	use `test`; create table t2 (a varchar(200))
engine=blackhole
+master-bin.000001	#	Create_file	1	#	db=test;table=t2;file_id=1;block_len=581
+master-bin.000001	#	Exec_load	1	#	;file_id=1
+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`; replace into t1 select * from t3
+drop table t1,t2,t3;

--- 1.2/mysql-test/t/blackhole.test	2005-03-25 01:07:54 +01:00
+++ 1.3/mysql-test/t/blackhole.test	2005-04-26 15:52:01 +02:00
@@ -96,4 +96,32 @@
 select * from t1 where MATCH(a,b) AGAINST ("indexes collections");
 select * from t1 where MATCH(a,b) AGAINST ("only");
 
-drop table if exists t1,t2;
+# Test that every DML (except SELECT) and DDL gets into binlog
+# so that blackhole can be used as "binlog propagator"
+
+reset master;
+drop table t1,t2;
+create table t1 (a int) engine=blackhole;
+delete from t1 where a=10;
+update t1 set a=11 where a=15;
+insert into t1 values(1);
+insert ignore into t1 values(1);
+replace into t1 values(100);
+create table t2 (a varchar(200)) engine=blackhole;
+load data infile '../../std_data/words.dat' into table t2;
+alter table t1 add b int;
+alter table t1 drop b;
+create table t3 like t1;
+insert into t1 select * from t3;
+replace into t1 select * from t3;
+# Just to verify
+select * from t1;
+select * from t2;
+select * from t3;
+
+let $VERSION=`select version()`;
+--replace_result $VERSION VERSION
+--replace_column 2 # 5 #
+show binlog events;
+
+drop table t1,t2,t3;
Thread
bk commit into 4.1 tree (gbichot:1.2207) BUG#10175guilhem26 Apr