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

Home » FUDforum Development » Bug Reports » can create threads, but unable to reply to them
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: can create threads, but unable to reply to them [message #4222 is a reply to message #4215] Thu, 18 July 2002 15:52 Go to previous messageGo to previous message
ben! is currently offline  ben!   United States
Messages: 7
Registered: July 2002
Karma:
Junior Member
Ok, figured out the problem.

Now, to refresh memories, when i attempted to reply to a thread, i was getting a nasty integer overflow error. So, i did a little snooping around, and found that a number too big for INT4 (aka INT, smallINT) was attempting to be inserted into a temporary table.

This is most notably found in a bunch of files in $WHEREEVER/theme/default/.

The temp table is created:
q("CREATE TEMP TABLE ".$tmp_tbl_name." ( forum_id INT NOT NULL, page INT NOT NULL, thread_id INT NOT NULL, pos SERIAL, tmp INT )");

an INSERT is attempted:
q("INSERT INTO ".$tmp_tbl_name." (thread_id,forum_id,page,tmp) SELECT fud21_thread.id, fud21_thread.forum_id, 4294967294, CASE WHEN is_sticky='Y' AND (fud21_msg.post_stamp+fud21_thread.orderexpiry>".$tm." OR fud21_thread.orderexpiry=0) THEN 4294967294
ELSE fud21_thread.last_post_date END AS sort_order_fld FROM fud21_thread INNER JOIN fud21_msg ON fud21_thread.root_msg_id=fud21_msg.id WHERE forum_id=".$forum_id." AND fud21_msg.approved='Y' ORDER BY sort_order_fld DESC, fud21_thread.last_post_id DESC LIMIT ".($GLOBALS['THREADS_PER_PAGE']*$page).", 0");

Note that the number 4294967294 is being inserted into a field with data type "INT", which can only handle numbers up to 2147483647.

However, the "BIGINT" type (aka INT8) can handle numbers up to 9223372036854775807. I don't think this affects MYSQL, but it sure does with PostgreSQL 7.2.1, as i have.

Attached are the file affected, with the data type of INT changed to INT8.

Yay!. BTW, i'm really enjoying FUD.





[Message index]
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: No sticky posts/announcements
Next Topic: Date
Goto Forum:
  

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

Current Time: Wed Nov 27 02:58:39 GMT 2024

Total time taken to generate the page: 0.07965 seconds