Bug #46655 | Replication works, but no updates on slave | ||
---|---|---|---|
Submitted: | 11 Aug 2009 16:05 | Modified: | 13 Aug 2009 21:27 |
Reporter: | Eugene Turkestanov | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S1 (Critical) |
Version: | 5.0.84 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | replication, slave, STATUS, updates |
[11 Aug 2009 16:05]
Eugene Turkestanov
[12 Aug 2009 5:39]
Sveta Smirnova
Thank you for the report. Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php You have a lot of replicate-do-db rules in the configuration file. Most likely you just [don't] hit these rules. Please read at http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html#option_mysqld_replic... how replicate-do-db works and if you still think this is MySQL bug provide repeatable test case: queries which are not replicated.
[12 Aug 2009 14:24]
Eugene Turkestanov
Thank you for your response and the links. I've read them carefully and I recognize that our settings in my.cnf actually hit the rules. If I missed something could you please point me to there or kindly explain it? Thank you in advance. Anyway, the problem still exists. According to my.cnf files I've provided, all of the queries log to binary log, then we use replicate-do-db option on slave to filter the queries. And, for example, when I run the query like "update table db1_conf.table1 set column1 = 1111;" on server 1, I can see that query in binary log on server 1. Then I can see that query in relay log on slave (server 2). But the query doesn't hit db1_conf.table1 on server 2. It happens for all of the databases we replcate. Please feel free to ask any other information you need.
[12 Aug 2009 19:32]
Sveta Smirnova
Thank you for the feedback. Page I provided link to clearly says: ----<q>---- Tell the slave to restrict replication to statements where the default database (that is, the one selected by USE) is db_name. To specify more than one database, use this option multiple times, once for each database. Note that this does not replicate cross-database statements such as UPDATE some_db.some_table SET foo='bar' while having selected a different database or no database. ----</q>----- So this is not a bug
[12 Aug 2009 21:49]
Eugene Turkestanov
Well, I would say it's a nice "feature". We went further in our investigation. If you set up master-master replication with options like: binlog-do-db = test binlog-do-db = test_2 replicate-do-table = test.test replicate-do-table = test_2.table1 it works perfectly. But if you nees to replicate entire database test and one table from test_2 database, the options should be like that: binlog-do-db = test binlog-do-db = test_2 replicate-do-db = test.test replicate-do-table = test_2.table1 It doesn't work. if you set up replication like that: binlog-do-db = test binlog-do-db = test_2 replicate-do-db = test replicate-do-db = test_2 it works again. So, we you have a choice of two options: to replicate entire databases or tables that you need. And if you need to replicate, for example, 10 databases with at least 20 tables in that and just 1 table from another database you'll have to type replicate-do-table for all this stuff many times. You can't use combination of replicate-do-db and replicate-do-table. Well, if it works like that... I would say it's a bug.
[13 Aug 2009 21:27]
Eugene Turkestanov
Sorry, I've been misspelled. The correct part is: But if you nees to replicate entire database test and one table from test_2 database, the options should be like that: binlog-do-db = test binlog-do-db = test_2 replicate-do-db = test replicate-do-table = test_2.table1 It doesn't work. Thank you