Do auto_increment ids ever get changed? [message #15934] |
Sat, 10 January 2004 02:12  |
 |
Wild_Cat
 Messages: 144 Registered: November 2002 Location: Odessa, Ukraine
Karma: 0
|
Senior Member |
|
|
Well, that's probably a stupid question since I don't know perfectly if this is possible at all, but if mySQL presents such a possibility of reindexing the auto-increment primary keys (such as IDs in FUD tables), does it ever happen in FUD (optimization of whatever)? And if yes, in which cases does it happen?
The reason I need this answer for is a try for writing a few hacks where I need to add tables referencing to other tables with user or thread or message ids, so I would like to know in advance if I need to make a kind of similar re-checking for my additional tables?
I did get my user_id changed once in some upgrade process, when another user registered with login admin (I installed the forum with different initial login) and he bacame user id=2 and me user id=9 (the next auto_increment num for the time)... but that could be a unique case due to the name specified, I guess. Or not?
For now I'm concretely interested in msg_id (the id in fud_msg table), but in close perspective in ids from _users and _threads and perhaps even _forums tables too, if it's not too fuzzy a question... (just to not ask twice or thrice) please?
Lady of Avalon
|
|
|
|
|
Re: Do auto_increment ids ever get changed? [message #15948 is a reply to message #15934] |
Sat, 10 January 2004 14:36  |
wfjmueller
 Messages: 95 Registered: December 2003 Location: Darmstadt, Germany
Karma: 0
|
Member |
|
|
A re-indexing, as you discuss, would obviously change for example the id's of all messages and thus make all external links to forum posts, like they are included in notification emails, point to a different posting. This is just one of several examples of external links which would break. So a re-indexing has bad side effects, and thus doesn't look like a desirable feature.
|
|
|