Using autoincrement fields in MySQL make it very difficult (if not impossible) to use database replication. In another project of mine, I needed to have servers in two sites. There may be other ways, but I couldn't find a way to do it if there were autoincrement fields.
I had to strip the database of the autoincrements, and added a table which I called id_server which had fields server_id (relating to the server_id() which is set in my.cnf), table_name and next_id. Then I had to go through all the scripts to call a function which returns the next_id (this also increments the value in id_server table) whenever there was an INSERT. id_server also needed to be populated with a value for each table and each slave server being used in replication. It was a bit of effort, but was worth it. The client that was complaining about slow internet speeds is now smiling (their server is now on their LAN and not the internet). Both servers are set up as masters and slaves of each other - two way replication. Postgres has recently had a replication feature released, I don't know how well it works (and I don't know how it deals with autoincrements). Perhaps some of the more technically minded people out there have better solutions. Mark Painter ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Care2002-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/care2002-developers

