MySQL bug, open for 13 years and counting(bugs.mysql.com) |
MySQL bug, open for 13 years and counting(bugs.mysql.com) |
In this case, it is a bug that will only affect people who make certain assumptions. One comment sums it up:
"This 'bug' fundamentally breaks basic assumptions about how AUTO_INCREMENT generally works"
I think there's your problem: making assumptions about how AUTO_INCREMENT works. The documentation doesn't say anywhere that it is guaranteed to never use a deleted key again.
One of my friends sent in a patch to bugzilla to check if something is null in Microsoft SQL server.
The check is in thousands of other places of the code of bugzilla, but the maintainer of that file has left it open.
Never fixing it, never accepting the commit.
Last I checked this, it was like 3 years ago; was still broken.
As far as I can tell, it will only cause problems if you don't delete entries from other tables that have a foreign key pointing to that row. There may be some cases where you need to do that, but generally isn't it better to properly delete all the rows from other tables that use that foreign key when you delete the primary key?