List:General Discussion« Previous MessageNext Message »
From:David Turner Date:December 12 2001 11:16pm
Subject:Re: Circular replication
View as plain text  
Just tell your boss that if you ever have turnover the former employee
will be able to log into all the customers' accounts and do whatever he

On Thu, Dec 13, 2001 at 03:29:41AM +1100, Duncan Maitland wrote:
> My questions concern a setup where a public server is running at our
> hosting company and a local office server is behind a firewall
> (connected to the net via a somewhat unreliable ADSL).
> The servers are configured in a circular master-slave relationship but
> only a limited number of tables in the database are replicated between
> the two (public doesn't need all of them, so no use in replicating). Of
> these tables only 3 need to accept writes from both the public and
> office server (all the other writes happen at the office). Of those 3
> tables only 1 makes use of a unique primary key.
> So my questions are:
> 1) Replicating a table with a primary key raises the possibility of
> conflicts if, while the office link is broken, two records are created
> with the same key. So I plan to generate my own keys in the project
> source code (without auto_increment) - the public site generates records
> with even numbers, the office site with odd numbers.
> Is this a reasonable setup or is there a more correct way? Out of
> interest, how will MySQL 4.0 replication handle this situation?
> 2) MySQL docs state "It is possible for client A to make an update to
> co-master 1, and in the meantime, before it propagates to co-master 2,
> client B could make an update to co-master 2 that will make the update
> of client A work differently than it did on co-master 1. Thus when the
> update of client A will make it to co-master 2, it will produce tables
> that will be different than what you have on co-master 1, even after all
> the updates from co-master 2 have also propagated."
> Say the office link is down, and a particular record in the
> above-mentioned table is edited on both the public and office servers.
> When the servers re-sync will one record take precedence (if so, which
> one?) or does the public get one and the office get the other? The
> former seems to be the case when doing basic testing on my LAN at home,
> but the MySQL doc is confusing in that it implies the latter.
> To those of you who have read all the way down to here, I thank you very
> much! :)
> Cheers,
> from Duncan Maitland
> dnma@stripped
> ---------------------------------------------------------------------
> Before posting, please check:
>   (the manual)
>           (the list archive)
> To request this thread, e-mail <mysql-thread93769@stripped>
> To unsubscribe, e-mail <>
> Trouble unsubscribing? Try:
Circular replicationDuncan Maitland12 Dec
  • Re: Circular replicationBrent Cowgill12 Dec
  • Re: Circular replicationDavid Turner13 Dec