Bug #6542 | create database and replication and replicate-do-table | ||
---|---|---|---|
Submitted: | 10 Nov 2004 10:04 | Modified: | 11 Feb 2005 16:04 |
Reporter: | Sergey Frolovichev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
Version: | 4.0.22 and all lower | OS: | |
Assigned to: | Lars Thalmann | CPU Architecture: | Any |
[10 Nov 2004 10:04]
Sergey Frolovichev
[11 Feb 2005 16:04]
Lars Thalmann
Thank you for your bug report. This is not actually a bug. The --replicate-do-table option only specifies what happens to statements involving tables. We are thinking about changing the semantics of this. But if we do, it will most likely not be implemented until version 5.1. There are two ways to get around this problem: ALTERNATIVE 1 ------------- Either upgrade to 4.1.8 or later and restrict replication of CREATE DATABASE statements by using --replicate-do-db or --replicate-ignore-db (a bug was fixed in 4.1.8, so you need to use at least this version). ALTERNATIVE 2 ------------- Use the --replicate-wild-do-table=db_name.tbl_name option. If you change your slave's options to: --replicate-wild-do-table=db1.% a 'CREATE DATABASE db2' will not be replicated.