FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Do auto_increment ids ever get changed?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Do auto_increment ids ever get changed? [message #15934] Sat, 10 January 2004 02:12 Go to next message
Wild_Cat is currently offline  Wild_Cat   Ukraine
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 #15935 is a reply to message #15934] Sat, 10 January 2004 02:17 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
auto-incremented ids never change optimizer simply cleans up tables and indexes and arranges them in an optimal manner.

FUDforum Core Developer
Re: Do auto_increment ids ever get changed? [message #15947 is a reply to message #15934] Sat, 10 January 2004 13:11 Go to previous messageGo to next message
Wild_Cat is currently offline  Wild_Cat   Ukraine
Messages: 144
Registered: November 2002
Location: Odessa, Ukraine
Karma: 0
Senior Member
Thank you

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 Go to previous message
wfjmueller is currently offline  wfjmueller   Germany
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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Which script modify to receive mail notify about all posts?
Next Topic: header tmpl too easy
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 29 22:03:09 GMT 2024

Total time taken to generate the page: 0.02576 seconds