Tuesday 17 March 2015

mysql auto increment bug

Hi friends,
Today I am going to tell you sort bug in mysql. Suppose you have a table with auto_increment field with unique field as well. When inserting a row in this table suppose unique constraint fail, but still auto_inrement count will be increased even if row is not inserted.

reference :
http://bugs.mysql.com/bug.php?id=63128
http://www.codediesel.com/mysql/sequence-gaps-in-mysql/
http://www.percona.com/blog/2011/11/29/avoiding-auto-increment-holes-on-innodb-with-insert-ignore/ 

No comments:

Post a Comment