From: Date: October 2 2008 9:13pm Subject: bzr commit into mysql-5.1 branch (mats:2684) Bug#38360 List-Archive: http://lists.mysql.com/commits/55195 X-Bug: 38360 Message-Id: <20081002191325.127DE469F5D@romeo> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///home/bzr/bugs/b38360-5.1-5.1-29-rc/ 2684 Mats Kindahl 2008-10-02 Bug #38360: BLACKHOLE replication with RBR is broken Incremental patch to add comments to test cases. modified: mysql-test/extra/rpl_tests/rpl_blackhole.test mysql-test/suite/rpl/t/rpl_blackhole.test === modified file 'mysql-test/extra/rpl_tests/rpl_blackhole.test' --- a/mysql-test/extra/rpl_tests/rpl_blackhole.test 2008-10-02 09:02:38 +0000 +++ b/mysql-test/extra/rpl_tests/rpl_blackhole.test 2008-10-02 19:13:15 +0000 @@ -1,3 +1,16 @@ +# Check replication of one statement assuming that the engine on the +# slave is a blackhole engine. + +# Input: +# $statement Statement to evaluate, it is assumed to change t1 + +# 1. Evaluate statement on master, it is assumed to change t1 +# 2. Wait for statement to be processed on slave +# 3. SELECT from table t1 to see what was written +# 4. Compare position on slave before executing statement and after +# executing statement. If difference is >0, then something was +# written to the binary log on the slave. + connection slave; let $before = query_get_value("SHOW MASTER STATUS", Position, 1); === modified file 'mysql-test/suite/rpl/t/rpl_blackhole.test' --- a/mysql-test/suite/rpl/t/rpl_blackhole.test 2008-10-02 09:02:38 +0000 +++ b/mysql-test/suite/rpl/t/rpl_blackhole.test 2008-10-02 19:13:15 +0000 @@ -1,8 +1,21 @@ --source include/master-slave.inc -# Test to test that blackhole works with replication, all three -# modes. We start by creating a table on the master and then change +# PURPOSE. Test that blackhole works with replication in all three +# modes: STATEMENT, MIXED, and ROW. +# +# METHOD. We start by creating a table on the master and then change # the engine to use blackhole on the slave. +# +# After insert/update/delete of one or more rows, the test the +# proceeds to check that replication is running after replicating an +# change, that the blackhole engine does not contain anything (which +# is just a check that the correct engine is used), and that something +# is written to the binary log. +# +# Whe check INSERT, UPDATE, and DELETE statement for tables with no +# key (forcing a range search on the slave), primary keys (using a +# primary key lookup), and index/key with multiple matches (forcing an +# index search). # We start with no primary key CREATE TABLE t1 (a INT, b INT, c INT);