continuent.org JIRA  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: TREP-339
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Robert Hodges
Reporter: Robert Hodges
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Tungsten Replicator

Tungsten replicator does not replicate temporary tables correctly in MySQL statement replication

Created: 22/Aug/09 10:51 AM   Updated: 11/Nov/09 08:10 PM
Component/s: MySQL Replication
Affects Version/s: None
Fix Version/s: Tungsten Replicator 1.0.4

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: MySQL 5.0 and 5.1 with statement replication enabled
Issue Links:
Duplicate
 
This issue is duplicated by:
TREP-40 Add session context information to SQ... Blocker Resolved
Related
This issue is related to:
TREP-70 Dynamic system variables not replicat... Critical Open
 


 Description   
Tungsten replicator does not correctly handle temporary tables when MySQL statement replication is enabled. For instance, if you use a temporary table to populate another table, the CREATE TEMPORARY TABLE command must be replicated to the slave. This results in failures due to the following:

1.) Multiple master sessions may simultaneously use temp tables, resulting in DDL errors on the slave side as the single applier thread tries to create multiple tables simultaneously.

2.) Autocommit transactions may be interleaved in such a way that statements succeed but the results use data from the wrong "version" of a temp table.

The root cause of this problem is the same as TREP-70. We need to track session data and segregate users of the same temp table.

NOTE: MySQL handling of temp tables is highly problematic and does not handle failure situations. The correct long-term workaround/solution is for applications to use 5.1 with row-based replication. However, not all users can upgrade, so this problme needs to be solved.

 All   Comments   Work Log   Change History      Sort Order:
Comment by Robert Hodges [02/Nov/09 11:57 PM]
This problem is resolved by enabling com.continuent.tungsten.replicator.filter.MySQLSessionSupportFilter to add session IDs to events. The filter prevents temp table conflicts on the slave.