Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 10.0.2
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Create a replication from server A db1 to Server B db2 using replicate-rewrite-db=db1->db2
Create a table in db1 on server A called tbl1, the table is not created on server B in db2.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Works all right for me. Here is the test case, you can use it literally in MTR or interpret as "steps to reproduce":
--source include/master-slave.inc
--enable_connect_log
--connection slave
CREATE DATABASE db2;
--connection master
CREATE DATABASE db1;
USE db1;
CREATE TABLE tbl1 (i INT);
--sync_slave_with_master
SHOW DATABASES;
SHOW TABLES IN db2;
Output:
[connection master]
connection slave;
CREATE DATABASE db2;
connection master;
CREATE DATABASE db1;
USE db1;
CREATE TABLE tbl1 (i INT);
connection slave;
SHOW DATABASES;
Database
db1
db2
information_schema
mtr
mysql
performance_schema
test
SHOW TABLES IN db2;
Tables_in_db2
tbl1
Are you sure you are setting the default database to db1 before trying to replicate, i.e. you do "USE db1"? That's the mandatory condition for this option, if you instead do something like
CREATE DATABASE db1;
CREATE TABLE db1.tbl1(i INT);
it's not supposed to work, by the definition of the option.