https://www.icyphoenix.com/viewtopic.php?f=35&t=8906&p=58154#p58154
-----------------------------------
jefazo666
Tue 29 Jan, 2013 00:12

Error Counting Unread Private Messages
-----------------------------------
Hi all, Yesterday, one user reported this error:

[quote]SQL ERROR [ mysql4 ]

BIGINT UNSIGNED value is out of range in '(`clubtwo3_club205`.`ip_users`.`user_unread_privmsg` - 1)' [1690]

SQL

UPDATE ip_users SET user_unread_privmsg = user_unread_privmsg - 1 WHERE user_id = 1262

BACKTRACE


FILE: includes/db/mysql.php
LINE: 295
CALL: sql_db->sql_error()

FILE: privmsg.php
LINE: 309
CALL: sql_db->sql_query()[/quote]

I made a research. The user had one unread message, but 0 marked at his ip_user table's record, so when he tries to read it, system fails while trying to make 0 -1 in an unsigned bigint. 

I solved this making this record + 1 by myself for this user, and other one with the same problem. By now, only two users reported this problem, and I do not know where can be the error counting this. I was thinking and these weeks I noticed that users are sending two times the request to the server. This is caused because if the user's screen didn't changed fast, they click again the link, and the same action is executed 2 times. I have seen several duplicated messages on the forum. I think something similar could happen here when the same user clicks on an unread message, and the system decreases it but not showed, so the patience less user clicked again, decreasing two times the counter. This could only happend if the user had more than 1 unread private message.

Did someone else saw the same error?


