MySQL Forums
Forum List  »  Replication

Re: INSERT INTO schema.table VS use schema
Posted by: Rick James
Date: May 30, 2014 01:25PM

Well, it is either a bug or a feature. It does case grief. Here's the story:

If

1. You have some kind of filtering: binlog/replication_do/ignore_... in the my.cnf on the Master and/or Slave. And...

2. You have the table name qualified by the database (test.animals) in the write query (INSERT). And...

3. The default database is not the same as the qualification (`test` in your example). (For example, you had "USE foo".) And...

4. The default db (foo) is not replicated, but the qualification (test) is. Then...

the write will be mysteriously not replicated.

Unravel that to see what you can do to avoid the "problem"...
* Don't use binlog/replication_do/ignore.
* Don't use db qualifiers.
* Be sure to USE the right db (as you saw with the case that worked).

Since you are coming through a third-party API (Drupal), you may not have control over those workarounds. Complain to them.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: INSERT INTO schema.table VS use schema
941
May 30, 2014 01:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.