The binary logs used for replication set the value used for
autoincrementing before each insert query. The number on the master
will always be replicated properly. If a row already exists with the
autoincrement value, my guess is that replication will die with an
error.

I'm not too sure which version of mysql introduced the feature.

On Thu, 18 Nov 2004 13:35:08 -0800, Robinson, Eric
<[EMAIL PROTECTED]> wrote:
> When you set a field to auto-increment, can you tell it where to start?
> 
> I'm trying to set up multimaster replication, but I'm worried about
> auto-increment collisions.
> 
> Q: If server A starts auto-incrementing at 0, and server B starts
> auto-incrementing at some point higher than the maximum number of
> records, would that allow replication without auto-increment collisions?
> 
> Q2: Assuming you can tell it where to start auto-incrementing, what
> happens after the following sequence:
> 
> 1. Johnny inserts record 1000 at server A.
> 
> 2. Server A receives record number 5000 from server B via replication.
> 
> 3. Mary needs to insert a new record. Does server A number the new
> record 1001 or 5001?
> 
> --
> 
> Eric Robinson
> 
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to