List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:December 31 2002 4:16am
Subject:Re: replication
View as plain text  
Bah. sql, query, queries, smallint

In the last episode (Dec 30), Rick Faircloth said:
> Aaaahhhh, that's how the auto_increment id problem is solved.
> I wonder why they can't do something like Access with its
> ReplicationID or whatever it's called...

Access just used a random 32-bit integer, and you risked generating
dupes.  If you go this route it might be better to create a dual-column
primary key, with the first column being the server-id taken from
my.cnf (already visible in the @server_id variable), and the other
column being a standard AUTO_INCREMENT field (but with each server
keeping track of its own max ID).

Oracle manages this by handing out "groups" of IDs to each server.  The
first server to add a record gets IDs 1-49, for eample, and the next
server gets 50-99.  When a server uses its range up, it asks for
another block (which server is in charge of handing out groups I don't
know.  Maybe the one with the highest uptime?)

	Dan Nelson

replicationMaxime LEMAIRE30 Dec
  • Re: replicationJeremy Zawodny30 Dec
    • RE: replicationRick Faircloth30 Dec
      • Re: replicationJeremy Zawodny30 Dec
        • RE: replicationRick Faircloth30 Dec
          • Re: replicationJeremy Zawodny31 Dec
          • Re: replicationDan Nelson31 Dec
            • Re: replicationJeremy Zawodny31 Dec
            • Mysql.Sock problemJason Steig31 Dec
              • RE: Mysql.Sock problemA.T.Z.31 Dec
                • Re: Mysql.Sock problemLeVar Bery31 Dec
  • Re: replicationArthur Fuller30 Dec
    • Re: replicationJeremy Zawodny30 Dec
    • Re: replicationThomas Spahni31 Dec
Re: Mysql.Sock problemKenneth Illingsworth31 Dec