summaryrefslogtreecommitdiff
path: root/mysql-test/t/blackhole.test
diff options
context:
space:
mode:
authorunknown <gbichot@quadita2.mysql.com>2005-04-26 15:52:04 +0200
committerunknown <gbichot@quadita2.mysql.com>2005-04-26 15:52:04 +0200
commit24caf249d32281259625ca3fd754805be0fbc307 (patch)
treeaeed7dc49e6c3f14d5f44863fa0ab9d61ca9b682 /mysql-test/t/blackhole.test
parent20cf8f82eefbc4db26ec50aef4f602c991811397 (diff)
downloadmariadb-git-24caf249d32281259625ca3fd754805be0fbc307.tar.gz
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/r/blackhole.result: result update mysql-test/t/blackhole.test: 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.
Diffstat (limited to 'mysql-test/t/blackhole.test')
-rw-r--r--mysql-test/t/blackhole.test30
1 files changed, 29 insertions, 1 deletions
diff --git a/mysql-test/t/blackhole.test b/mysql-test/t/blackhole.test
index 052574d6921..d1fcfc971a9 100644
--- a/mysql-test/t/blackhole.test
+++ b/mysql-test/t/blackhole.test
@@ -96,4 +96,32 @@ select * from t1 where MATCH(a,b) AGAINST ("indexes");
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;