#16992: MySQL InnoDB AUTO_INCREMENT bug (next value to use forgotten at restart)
----------------------------------------------+--------------------
     Reporter:  kent@…                        |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.3
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 I recently ran into problems with Django's automatic id field.

 When the latest added object in a table was deleted, a new object created
 some time later reused the same id value as the deleted object.

 It turned out that this was due to the fact that I had restarted the
 MySQL server between the deletion and the creation, and the fact
 that the InnoDB backend does not remember the AUTO_INCREMENT value
 when restarted (instead recreating it as "max(id)+1").

 See for example http://bugs.mysql.com/bug.php?id=727

 I guess there is not much that Django can do to fix this, but I think
 the MySQL/InnoDB documentation should mention this peculiarity.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16992>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to