We have been trying to solve a replication issue related to TEMPORARY
tables.

Here's the issue

Every three hours we run a processX (C++ compiled program) on the Master
mysql that goes something like this:

CREATE TEMPORARY TABLE tempTableA
  INSERT INTO tempTableA
INSERT INTO normalTableB SELECT * FROM tempTableA

processX terminates.

Here's what we observe on the Slave side:
ERROR: 1146 Table 'MainDatabase.tempTableA' does not exist
Slave: error running query 'INSERT normalTableB SELECT * FROM tempTableA

At this point the Slave stops replicating and we have a perl shell script
running on the master every 15 minutes to determine if replication is active
and restart replication if required.

Our theory is that when processX terminates, the tempTableA disappears
before the slave side has had a chance to pull all the replicated data
across and access the information in tempTableA.

N.B.
We have process privileges set for the processX mysql username enabled on
the slave.

We are looking into 2 options at this point.
1. Figure out a reliable way to determine if the replication resulting from
processX has completed.
2. Move all references of TEMPORARY tables to "scratch" tables on
MainDatabase.

We would rather use option 1 because we feel it is cleaner and would
hopefully perturb our code less. We actually have multiple different
processes each having this problem.

Has anyone encountered this and come up with a solution?

Thanks  

Peter

Peter Jennings
Public Communications Services
(310) 954-3018
(310) 954-2159 fax
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to