From 03b16815a7494f3c9b073a090b977fb2bdbae22a Mon Sep 17 00:00:00 2001 From: Patrick Crews Date: Mon, 15 Sep 2008 15:13:43 -0400 Subject: Bug#39803 Test rpl.rpl_truncate_7ndb_2 failing Fixed bad path in .test file Moved test to suite/rpl_ndb (per Cluster QA) Re-recorded .result file to updated expected results. --- mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result | 91 ---------------------- .../suite/rpl/t/rpl_truncate_7ndb_2-master.opt | 1 - mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test | 6 -- 3 files changed, 98 deletions(-) delete mode 100644 mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result delete mode 100644 mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt delete mode 100644 mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test (limited to 'mysql-test/suite/rpl') diff --git a/mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result b/mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result deleted file mode 100644 index d43704c2ba7..00000000000 --- a/mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result +++ /dev/null @@ -1,91 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Master **** -DROP TABLE t1; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 223 Query 1 287 BEGIN -master-bin.000001 287 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 327 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 385 Write_rows 1 157 table_id: # -master-bin.000001 444 Write_rows 1 204 table_id: # flags: STMT_END_F -master-bin.000001 491 Query 1 556 COMMIT -master-bin.000001 556 Query 1 636 use `test`; TRUNCATE TABLE t1 -master-bin.000001 636 Query 1 712 use `test`; DROP TABLE t1 -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -3 3 -**** On Master **** -DROP TABLE t1; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 223 Query 1 287 BEGIN -master-bin.000001 287 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 327 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 385 Write_rows 1 157 table_id: # -master-bin.000001 444 Write_rows 1 204 table_id: # flags: STMT_END_F -master-bin.000001 491 Query 1 556 COMMIT -master-bin.000001 556 Query 1 636 use `test`; TRUNCATE TABLE t1 -master-bin.000001 636 Query 1 712 use `test`; DROP TABLE t1 -master-bin.000001 712 Query 1 829 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 829 Query 1 893 BEGIN -master-bin.000001 893 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 933 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 991 Write_rows 1 157 table_id: # -master-bin.000001 1050 Write_rows 1 204 table_id: # flags: STMT_END_F -master-bin.000001 1097 Query 1 1162 COMMIT -master-bin.000001 1162 Query 1 1226 BEGIN -master-bin.000001 1226 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 1266 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1324 Write_rows 1 157 table_id: # -master-bin.000001 1383 Delete_rows 1 196 table_id: # flags: STMT_END_F -master-bin.000001 1422 Query 1 1487 COMMIT -master-bin.000001 1487 Query 1 1563 use `test`; DROP TABLE t1 diff --git a/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt b/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt deleted file mode 100644 index 01cf3e0520f..00000000000 --- a/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=mixed diff --git a/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test b/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test deleted file mode 100644 index 5381dff95a3..00000000000 --- a/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test +++ /dev/null @@ -1,6 +0,0 @@ -# Same test as rpl_truncate_7ndb.test, but with mixed mode -# This is marked with 'big_test' just because the rpl_truncate_7ndb test is -# so slow... ---source include/have_binlog_format_mixed.inc ---source include/big_test.inc ---source t/rpl_truncate_7ndb.test -- cgit v1.2.1 From 1901da7f517f6f1877990ad004d3b716533e1d3e Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Wed, 1 Oct 2008 16:02:04 +0200 Subject: BUG#38269: pushbuild gives valgrind error in ha_statistic_increment for rpl_temporary Re-enabling failing test case because server logs were lost in pushbuild, so we need to run it again. --- mysql-test/suite/rpl/t/disabled.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/suite/rpl') diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index a8c83d58884..f215cf75f3d 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -12,5 +12,5 @@ rpl_redirect : Failure is sporadic and and the test is superfluous (mats) rpl_innodb_bug28430 : Failure on Solaris Bug #36793 -rpl_temporary : BUG#38269 2008-07-21 Sven valgrind error in pushbuild +#rpl_temporary : BUG#38269 2008-07-21 Sven valgrind error in pushbuild rpl_flushlog_loop : BUG#37733 2008-07-23 Sven disabled in 5.1-bugteam. the bug has been fixed in 5.1-rpl: please re-enable when that gets pushed to main -- cgit v1.2.1 From 43fb8633b0774f00dce6490fd93deebdfe4ab386 Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Thu, 2 Oct 2008 11:02:38 +0200 Subject: Bug #38360: BLACKHOLE replication with RBR is broken The Blackhole engine did not support row-based replication since the delete_row(), update_row(), and the index and range searching functions were not implemented. This patch adds row-based replication support for the Blackhole engine by implementing the two functions mentioned above, and making the engine pretend that it has found the correct row to delete or update when executed from the slave SQL thread by implementing index and range searching functions. It is necessary to only pretend this for the SQL thread, since a SELECT executed on the Blackhole engine will otherwise never return EOF, causing a livelock. --- mysql-test/suite/rpl/r/rpl_blackhole.result | 100 ++++++++++++++++++++++++++++ mysql-test/suite/rpl/t/rpl_blackhole.test | 66 ++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_blackhole.result create mode 100644 mysql-test/suite/rpl/t/rpl_blackhole.test (limited to 'mysql-test/suite/rpl') diff --git a/mysql-test/suite/rpl/r/rpl_blackhole.result b/mysql-test/suite/rpl/r/rpl_blackhole.result new file mode 100644 index 00000000000..27094e761b0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_blackhole.result @@ -0,0 +1,100 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 (a INT, b INT, c INT); +CREATE TABLE t2 (a INT, b INT, c INT); +ALTER TABLE t1 ENGINE=BLACKHOLE; +INSERT INTO t2 VALUES (1,9,1), (2,9,2), (3,9,3), (4,9,4); +[on master] +INSERT INTO t1 VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4); +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< +[on master] +UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 1; +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< +[on master] +DELETE FROM t1 WHERE a % 2 = 0 AND b = 1; +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< +[on master] +INSERT INTO t1 SELECT * FROM t2; +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< +[on master] +INSERT INTO t2 SELECT * FROM t1; +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< +ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b); +[on master] +INSERT INTO t1 VALUES (1,2,1),(2,2,2),(3,2,3),(4,2,4); +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< +[on master] +UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 2; +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< +[on master] +DELETE FROM t1 WHERE a % 2 = 0 AND b = 2; +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< +ALTER TABLE t1 DROP PRIMARY KEY, ADD KEY key_t1 (a); +[on master] +INSERT INTO t1 VALUES (1,3,1),(2,3,2),(3,3,3),(4,3,4); +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< +[on master] +UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 3; +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< +[on master] +DELETE FROM t1 WHERE a % 2 = 0 AND b = 3; +[on slave] +# Expect 0 +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +>>> Something was written to binary log <<< diff --git a/mysql-test/suite/rpl/t/rpl_blackhole.test b/mysql-test/suite/rpl/t/rpl_blackhole.test new file mode 100644 index 00000000000..c25c4954dfa --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_blackhole.test @@ -0,0 +1,66 @@ +--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 +# the engine to use blackhole on the slave. + +# We start with no primary key +CREATE TABLE t1 (a INT, b INT, c INT); +CREATE TABLE t2 (a INT, b INT, c INT); + +sync_slave_with_master; +ALTER TABLE t1 ENGINE=BLACKHOLE; + +connection master; +INSERT INTO t2 VALUES (1,9,1), (2,9,2), (3,9,3), (4,9,4); +sync_slave_with_master; + +# Test insert, no primary key +let $statement = INSERT INTO t1 VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4); +source extra/rpl_tests/rpl_blackhole.test; + +# Test update, no primary key +let $statement = UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 1; +source extra/rpl_tests/rpl_blackhole.test; + +# Test delete, no primary key +let $statement = DELETE FROM t1 WHERE a % 2 = 0 AND b = 1; +source extra/rpl_tests/rpl_blackhole.test; + +# Test INSERT-SELECT into Blackhole, no primary key +let $statement = INSERT INTO t1 SELECT * FROM t2; +source extra/rpl_tests/rpl_blackhole.test; + +# Test INSERT-SELECT from Blackhole, no primary key +let $statement = INSERT INTO t2 SELECT * FROM t1; +source extra/rpl_tests/rpl_blackhole.test; + +connection master; +ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b); + +# Test insert, primary key +let $statement = INSERT INTO t1 VALUES (1,2,1),(2,2,2),(3,2,3),(4,2,4); +source extra/rpl_tests/rpl_blackhole.test; + +# Test update, primary key +let $statement = UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 2; +source extra/rpl_tests/rpl_blackhole.test; + +# Test delete, primary key +let $statement = DELETE FROM t1 WHERE a % 2 = 0 AND b = 2; +source extra/rpl_tests/rpl_blackhole.test; + +connection master; +ALTER TABLE t1 DROP PRIMARY KEY, ADD KEY key_t1 (a); + +# Test insert, key +let $statement = INSERT INTO t1 VALUES (1,3,1),(2,3,2),(3,3,3),(4,3,4); +source extra/rpl_tests/rpl_blackhole.test; + +# Test update, key +let $statement = UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 3; +source extra/rpl_tests/rpl_blackhole.test; + +# Test delete, key +let $statement = DELETE FROM t1 WHERE a % 2 = 0 AND b = 3; +source extra/rpl_tests/rpl_blackhole.test; -- cgit v1.2.1 From 3337923cfd8d0657da364ea9abefe440386c2151 Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Thu, 2 Oct 2008 21:13:15 +0200 Subject: Bug #38360: BLACKHOLE replication with RBR is broken Incremental patch to add comments to test cases. --- mysql-test/suite/rpl/t/rpl_blackhole.test | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite/rpl') diff --git a/mysql-test/suite/rpl/t/rpl_blackhole.test b/mysql-test/suite/rpl/t/rpl_blackhole.test index c25c4954dfa..0609a4c6048 100644 --- a/mysql-test/suite/rpl/t/rpl_blackhole.test +++ b/mysql-test/suite/rpl/t/rpl_blackhole.test @@ -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); -- cgit v1.2.1 From d19bdf3b30776d469e7cf5aec64962328445f337 Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Fri, 3 Oct 2008 12:52:01 +0200 Subject: The test rpl_blackhole was executed even when there were no blackhole installed. This patch adds a check for that. --- mysql-test/suite/rpl/t/rpl_blackhole.test | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite/rpl') diff --git a/mysql-test/suite/rpl/t/rpl_blackhole.test b/mysql-test/suite/rpl/t/rpl_blackhole.test index 0609a4c6048..e8dfbd51552 100644 --- a/mysql-test/suite/rpl/t/rpl_blackhole.test +++ b/mysql-test/suite/rpl/t/rpl_blackhole.test @@ -1,5 +1,3 @@ ---source include/master-slave.inc - # PURPOSE. Test that blackhole works with replication in all three # modes: STATEMENT, MIXED, and ROW. # @@ -17,6 +15,9 @@ # primary key lookup), and index/key with multiple matches (forcing an # index search). +source include/master-slave.inc; +source include/have_blackhole.inc; + # We start with no primary key CREATE TABLE t1 (a INT, b INT, c INT); CREATE TABLE t2 (a INT, b INT, c INT); -- cgit v1.2.1 From 80505cc9fd118790eb9615fd1de37ac365b8d7af Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin Date: Tue, 7 Oct 2008 18:21:17 +0500 Subject: Fix for bug#38269: pushbuild gives valgrind error in ha_statistic_increment for rpl_temporary Problem: in some cases master send a special event to reconnecting slave to keep slave's temporary tables (see #17284) and they still have references to the "old" SQL slave thread and use them to access thread's data. Fix: set temporary tables thread references to the actual SQL slave thread in such cases. --- mysql-test/suite/rpl/t/disabled.def | 1 - 1 file changed, 1 deletion(-) (limited to 'mysql-test/suite/rpl') diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index a8c83d58884..ebdb8014f88 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -12,5 +12,4 @@ rpl_redirect : Failure is sporadic and and the test is superfluous (mats) rpl_innodb_bug28430 : Failure on Solaris Bug #36793 -rpl_temporary : BUG#38269 2008-07-21 Sven valgrind error in pushbuild rpl_flushlog_loop : BUG#37733 2008-07-23 Sven disabled in 5.1-bugteam. the bug has been fixed in 5.1-rpl: please re-enable when that gets pushed to main -- cgit v1.2.1 From 3c13410756b1187fb4d7f60a3b078325f8026a77 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 7 Oct 2008 19:54:12 +0300 Subject: fixed test suite failures in 5.1-bugteam --- mysql-test/suite/rpl/r/rpl_temporary.result | 3 +++ mysql-test/suite/rpl/t/rpl_temporary.test | 2 ++ 2 files changed, 5 insertions(+) (limited to 'mysql-test/suite/rpl') diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result index 03d2ca660dc..d8fea78ecb4 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary.result +++ b/mysql-test/suite/rpl/r/rpl_temporary.result @@ -24,6 +24,9 @@ drop table if exists t1,t2; create table t1(f int); create table t2(f int); insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +SELECT COUNT(*) FROM t1; +COUNT(*) +10 create temporary table t3(f int); insert into t3 select * from t1 where f<6; create temporary table t3(f int); diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test index 51b38ed4837..a40d1cbb5c5 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary.test +++ b/mysql-test/suite/rpl/t/rpl_temporary.test @@ -56,6 +56,8 @@ drop table if exists t1,t2; create table t1(f int); create table t2(f int); insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +# Auxiliary select (We want that all rows are in the table) +SELECT COUNT(*) FROM t1; connection con1; create temporary table t3(f int); -- cgit v1.2.1 From 70b18065d002eee1d484a0191238ea4f5594e5bf Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Wed, 8 Oct 2008 11:15:00 +0200 Subject: Bug #34707: Row based replication: slave creates table within wrong database The failure was caused by executing a CREATE-SELECT statement that creates a table in another database than the current one. In row-based logging, the CREATE statement was written to the binary log without the database, hence creating the table in the wrong database, causing the following inserts to fail since the table didn't exist in the given database. Fixed the bug by adding a parameter to store_create_info() that will make the function print the database name before the table name and used that in the calls that write the CREATE statement to the binary log. The database name is only printed if it is different than the currently selected database. The output of SHOW CREATE TABLE has not changed and is still printed without the database name. --- mysql-test/suite/rpl/r/rpl_row_create_table.result | 21 +++++++++++++++++++++ mysql-test/suite/rpl/t/rpl_row_create_table.test | 17 +++++++++++++++++ 2 files changed, 38 insertions(+) (limited to 'mysql-test/suite/rpl') diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result index c4cf8353bca..ad659c37b7f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -430,4 +430,25 @@ a 1 2 DROP TABLE t1; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE DATABASE mysqltest1; +CREATE TABLE mysqltest1.without_select (f1 BIGINT); +CREATE TABLE mysqltest1.with_select AS SELECT 1 AS f1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # CREATE DATABASE mysqltest1 +master-bin.000001 # Query # # use `test`; CREATE TABLE mysqltest1.without_select (f1 BIGINT) +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; CREATE TABLE `mysqltest1`.`with_select` ( + `f1` int(1) NOT NULL DEFAULT '0' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.with_select) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT +DROP DATABASE mysqltest1; end of the tests diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test index e5cdfa4341a..3fb5aa8e1f2 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -259,5 +259,22 @@ connection master; DROP TABLE t1; sync_slave_with_master; +# +# BUG#34707: Row based replication: slave creates table within wrong database +# + +source include/master-slave-reset.inc; + +connection master; +CREATE DATABASE mysqltest1; + +CREATE TABLE mysqltest1.without_select (f1 BIGINT); +CREATE TABLE mysqltest1.with_select AS SELECT 1 AS f1; +source include/show_binlog_events.inc; +sync_slave_with_master; + +connection master; +DROP DATABASE mysqltest1; +sync_slave_with_master; --echo end of the tests -- cgit v1.2.1