List:General Discussion« Previous MessageNext Message »
From:web Date:October 13 1999 4:14am
Subject:auto_increment logging problem
View as plain text  
using mysql 3.23.4 I am having a problem with the update log and
auto_increment.  This problem didn't happen with 3.22.x as the
auto_increment is handled differently!

I have a master database and several slave databases.  Say I have to
recreate an index file on one of the slaves for a table with an
auto_increment field; this resets the auto_increment counter in the MYI file
to 0.

When I use the update log to sync the databases, it breaks with duplicate
keys.  This is because the update logging as it is now doesn't do:

SET insert_id=nnn

It only does: SET last_insert_id=nnn.  This doesn't affect the
auto_increment value used for inserts!

This makes replication a pain as I have to manually set the auto_increment
value in the slave table.

Please add SET insert_id=nnn to the update logging!


auto_increment logging problemweb13 Oct
  • auto_increment logging problemMichael Widenius14 Oct