Loading mysql-test/extra/rpl_tests/rpl_blackhole.test +13 −0 Original line number Diff line number Diff line # 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); Loading mysql-test/suite/rpl/t/rpl_blackhole.test +15 −2 Original line number Diff line number Diff line --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); Loading Loading
mysql-test/extra/rpl_tests/rpl_blackhole.test +13 −0 Original line number Diff line number Diff line # 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); Loading
mysql-test/suite/rpl/t/rpl_blackhole.test +15 −2 Original line number Diff line number Diff line --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); Loading