Understood. My problem is not that, my problem is I have some tables that
work like table_index -> table_that_use_table_index_pk
So, having this
Table_index
Id name
1 John
2 Stewart
Table_data
Id Index_id Age
34 1 28
56 2 56
If I'm to replicate this info into a database with different offsets, this
relationship would failed cause the index_id wouldn't change however the
table_index ph would change.
This is my main concern.
-----Original Message-----
From: Marcus Bointon [mailto:marcus@stripped]
Sent: quinta-feira, 27 de Outubro de 2011 11:32
To: Replication replication
Subject: Re: Master-Master -> duplicate entry
On 27 Oct 2011, at 12:07, Ricardo Freitas wrote:
> So having a Master-Master where you only write to one Master (lets say the
> main one), you still need the increment and offset changed?
>
> My guess is no, right?
No, you do need them set because if you switch back and forth between
masters it ensures you won't ever get clashes.
It's common to use an increment of 10 and offsets within that, though be
aware that if you're on a 32-bit system that means your autoincrement fields
can run out of numbers after ~200million records and it will all go horribly
wrong, especially in PHP which doesn't do unsigned ints. It's also very
embarrassing. Run MySQL (and PHP) on a 64-bit OS!
Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK info@hand CRM solutions
marcus@stripped | http://www.synchromedia.co.uk/
--
MySQL Replication Mailing List
For list archives: http://lists.mysql.com/replication
To unsubscribe:
http://lists.mysql.com/replication?unsub=1