Page 1 of 1

Replication broken version 11.0

Posted: Wed Nov 16, 2011 11:18 am
by mimai
Replication in version 11.0 was broken with the following error:

Error 'Duplicate entry '0' for key 'PRIMARY'' on query. Default database: 'opendental'. Query: 'INSERT INTO tempused

SELECT patplan.PatPlanNum,

SUM(IFNULL(claimproc.InsPayAmt,0))

FROM claimproc

LEFT JOIN patplan ON patplan.PatNum = claimproc.PatNum

AN...

Any idea why this happened? Looks like table tempused not deleted or reset after use? Please provide fix.

Re: Replication broken version 11.0

Posted: Wed Nov 16, 2011 12:52 pm
by jordansparks
mysql replication, right? Not SymmetricDS?

Re: Replication broken version 11.0

Posted: Wed Nov 16, 2011 12:58 pm
by jordansparks
The only place in the entire program where "tempused" exists is in the new treatment finder report. We do, however, properly drop the table when we're done with it. Maybe you are getting some sort of error message in that window which causes it to exit the queries before it gets to the place where it drops the table. So I will have the programmers add a few lines to drop the table yet again when exiting that window.

Re: Replication broken version 11.0

Posted: Wed Nov 16, 2011 1:23 pm
by jordansparks
Actually, it might be an error with that actual query. Perhaps you could run that query on your db to see what happens. Do you have the rest of it?