Replication broken version 11.0

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
mimai
Posts: 24
Joined: Wed Aug 01, 2007 3:01 am

Replication broken version 11.0

Post by mimai » Wed Nov 16, 2011 11:18 am

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.

User avatar
jordansparks
Site Admin
Posts: 5771
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Replication broken version 11.0

Post by jordansparks » Wed Nov 16, 2011 12:52 pm

mysql replication, right? Not SymmetricDS?
Jordan Sparks, DMD
http://www.opendental.com

User avatar
jordansparks
Site Admin
Posts: 5771
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Replication broken version 11.0

Post by jordansparks » Wed Nov 16, 2011 12:58 pm

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.
Jordan Sparks, DMD
http://www.opendental.com

User avatar
jordansparks
Site Admin
Posts: 5771
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Replication broken version 11.0

Post by jordansparks » Wed Nov 16, 2011 1:23 pm

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?
Jordan Sparks, DMD
http://www.opendental.com

Post Reply