Bug #50597 Replication breaks between master/slave with lower_case_table_names
Submitted: 25 Jan 2010 18:04 Modified: 25 Jan 2010 19:49
Reporter: Kevin Benton Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.1.37-enterprise-gpl-advanced-log OS:Linux
Assigned to: CPU Architecture:Any

[25 Jan 2010 18:04] Kevin Benton
Description:
Replication from master with lower_case_table_names = 0 with mixed case table names to slave with lower_case_table_names = 1 with all lower-case table names with the following error message:

Error 'Table 'xrf.cds_ConnectorStatus' doesn't exist' on opening tables

The table xrf.cds_connectorstatus does exist on the slave, however, the replication slave can't find it.

How to repeat:
See description

Suggested fix:
See description
[25 Jan 2010 18:23] Kevin Benton
I should add - the storage engine in the master and slave is InnoDB in both cases.
[25 Jan 2010 18:48] Kevin Benton
Looking at sql/rpl_filter.cc, I am wondering if Rpl_filter::add_filter_rule needs to downcase the name of the table being added when lower_case_table_names is 1.  I also wonder the same thing for Rpl_filter::table_rule_ent_has_to_str, Rpl_filter::table_rule_ent_dynamic_array_to_str, along with other methods in this file.  In fact, I am concerned that I don't see any case insensitive comparisons in this file.
[25 Jan 2010 19:48] Andrew Hutchings
Closing as duplicate of bug #37656