MySQL Forums
Forum List  »  Replication

Re: Mysql 5.7.10 Master-Master replication stops with 1032 error
Posted by: Rick James
Date: June 25, 2016 10:55PM

> update crm_crmentity_seq set id=LAST_INSERT_ID(id+1)

I don't think that is a valid use of LAST_INSERT_ID().

You should only need
update crm_crmentity_seq set id=id+1
But that has a serious problem when dealing with Master-Master. Each Master could execute that at the same time, thereby getting the same ID for subsequent use.

Look at AUTO_INCREMENT and auto_increment_increment=2 and auto_increment_offset being different on each Master. That can guarantee no dups. (There are other details.)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Mysql 5.7.10 Master-Master replication stops with 1032 error
1991
June 25, 2016 10:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.