Bug #70877 | DCL statement is failing on slave with replicate-ignore-db=mysql | ||
---|---|---|---|
Submitted: | 11 Nov 2013 7:44 | Modified: | 19 Nov 2013 7:53 |
Reporter: | Ramesh Sivaraman | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
Version: | MySQL 5.x, 5.5.34 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[11 Nov 2013 7:44]
Ramesh Sivaraman
[11 Nov 2013 9:54]
MySQL Verification Team
Hello Ramesh, Thank you for the report. Verified as described. Thanks, Umesh
[11 Nov 2013 9:55]
MySQL Verification Team
Also see, Bug #9483
[17 Nov 2013 3:53]
Venkatesh Duggirala
Posted by developer: Hello Ramesh, Thank you for reporting the issue. We have looked into the scenario, please find our analysis below on the same. Setting --replicate-ignore-db=db_name means, In Statement-based replication, tells the slave SQL thread not to replicate any statement where the default database (that is, the one selected by USE) is db_name. The same holds true in case of DDLs in Row-base replication as well. --replicate-ignore-db=db1 use db1; create table db2.t1(i int); => will *not* be replicated to slave though it is db2's t1. use db2; create table db1.t1(i int); => will be replicated to slave though it is db1' t1. In your example, there is no problem in the scenario mentioned. MySQL behaved the same as the way documentation says. Please note that grant/drop user were done when default database 'test' and replicate-ignore-db contains only 'mysql'. Even though they grant/drop user are related to 'mysql' database, they wont be filtered out as explained above. For more details on replication filters, please visit http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_replic... Please let us know if you need more information on the same.
[19 Nov 2013 7:53]
Ramesh Sivaraman
Thanks Venkatesh for the info. As a feature request, is it possible to restrict these statements( specific to schemas in --replicate-ignore-db list) to write in binary files ?. So that we wont end up with replication slave error. -- Thanks, Ramesh
[21 Nov 2013 2:14]
Venkatesh Duggirala
Hello Ramesh, You can use --replicate-wild* filter rules to achieve the same. As bug9483 mentioned, one can govern replication of GRANT/REVOKE only via explicitly providing --replicate-wild-{ignore,do}-table=mysql.% I.e if one does not want to replicate GRANT/REVOKE, --replicate-wild-ingore-table=mysql.% is necessary.