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

Home » FUDforum Development » FUDforum 3.0+ » fud_thread_view pos field and auto_increment
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
fud_thread_view pos field and auto_increment [message #30907] Mon, 20 March 2006 15:41 Go to next message
idofud is currently offline  idofud   France
Messages: 7
Registered: March 2006
Karma: 0
Junior Member
Hi,
after spending lots of time debugging a problem with a forum, version 2.6.0 (bundle with egroupware)
i notice that on fud_thread_view table , the pos field is auto_increment.

then when you insert, ou delete a new thread on a forum, the table is empty forthe forum
delete from fud_thread_view where forum_id=2 for exmaple
then thread are reselected from fud_thread and inster and the a new pos and page are calcultaed with ceiling function.

and the same goes for the consistency checker.

my problem is that after some time, the page number became greater than 1, leading to for exmaple 4 ou 5 for every thread.

when the table is deleted for a forum, then record are re inserted, the pos column is not specified leading to mysql to auto_increment it.
but then after you 've done it some time, the auto_increment goes up and up, leading to a bad page number.

shouldn't the auto_increment be resetted after sometime?
is it on purpose?

what could cause the page column to all be 4 (for exmaple) instead of 1 (leading to the thread list of a forum being empty)

if i run the consistency checker it will set all page number to 4 because it is based on the pos column, which became gretaer and greater the more you delete a thread.

any hint very welcome,

i keep on correcting it every weeks.
thanks.

Re: fud_thread_view pos field and auto_increment [message #30917 is a reply to message #30907] Mon, 20 March 2006 16:43 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 increment should continue incrementing, it should never be reset, doing so will cause problems.

FUDforum Core Developer
Re: fud_thread_view pos field and auto_increment [message #30926 is a reply to message #30907] Mon, 20 March 2006 21:18 Go to previous messageGo to next message
idofud is currently offline  idofud   France
Messages: 7
Registered: March 2006
Karma: 0
Junior Member
thanks for the answer.

but after some insert,delete on thread, the auto_increment give a pos number that the
update fud_thread_view set page=...,pos=..ceiling...
give page=4
with no thread at 1 2 or 3.

is it a normal behavior that page became 4 with no thread on page 1 2 3?

i know what i'm writing semms weird, but on a forum,
every week or two,
the only way ican make the thread list page of a forum (base on fud_thread_view table as far as i understood the code) not being blank, is to drop the table and re run consistency checker.

if i don't, each time i post a new thread or delete one in a forum, all thread on that forum have page=4 -or 5) and are not showing on the page.
Re: fud_thread_view pos field and auto_increment [message #30943 is a reply to message #30926] Tue, 21 March 2006 14:25 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
It could be an issue with the very old code responsible for the generation of the topic view. I'd recommend upgrading the forum to a newer release, the algorithm has changed quite a bit since 2.6.0 days.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: LOCK TABLES
Next Topic: Problems Upgrading
Goto Forum:
  

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

Current Time: Sat Nov 30 06:54:46 GMT 2024

Total time taken to generate the page: 0.02110 seconds