Add new comment

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Submitted by Fabio Cecaro (not registered) on Thu, 2008-11-27 10:53.

Hi sheikhsa,

In a Master-Master replication there are many problems with the autonumber field tables.

Because when a client insert a value in a table in a master on the other master we can have another client with another insert in the same table. So we have a possible conflict when the replication mechanism replies these two records, because if this ID is relationate with another table I think we corrupting the relational logical.

We must fix addend two lines in the my.cnf of two masters

auto_increment_increment

auto_increment_offset

Example in this case we can set to the first Master the values:

auto_increment_increment = 2

auto_increment_offset = 1

 and in the other:

auto_increment_increment = 2

auto_increment_offset = 2.

So in one master we generate only the pairs number and  dispair in the other, when the replication come we haven't conflicts.

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.