Page 1 of 1
[SOLVED] ERROR deleting messages.
Posted: Mon Oct 05, 2020 2:49 pm
by smilbuta
I am attempting to clear old sent messages.
I get the following error.
Code: Select all
SQL ERROR [ mysqli ]
BIGINT UNSIGNED value is out of range in '(`barterto_main`.`bt_privmsgs_folder`.`pm_count` - 11)' [1690]
An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
Steps to replicate:
1. go to Private Messages
2. go to Saved Messages
3. Select 'mark all'
4. Chose "Delete Marked"
5. Press 'GO'
6. Confirm 'yes'
7...Error message at this part.
Re: ERROR deleting messages.
Posted: Tue Oct 06, 2020 3:06 am
by 3eland
Thanks for the post, I'll make sure the Mechanic is directed to this post!
Ryan
Re: ERROR deleting messages.
Posted: Tue Oct 06, 2020 3:15 am
by Plarz
smilbuta wrote: ↑Mon Oct 05, 2020 2:49 pm
I am attempting to clear old sent messages.
I get the following error.
Code: Select all
SQL ERROR [ mysqli ]
BIGINT UNSIGNED value is out of range in '(`barterto_main`.`bt_privmsgs_folder`.`pm_count` - 11)' [1690]
An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
Steps to replicate:
1. go to Private Messages
2. go to Saved Messages
3. Select 'mark all'
4. Chose "Delete Marked"
5. Press 'GO'
6. Confirm 'yes'
7...Error message at this part.
Thanks for the detailed error report! Super helpful. Also, I'm sorry you're running into an issue. That sucks.
I'm going to run a repair on the database and we'll see if that fixes whatever's going on. If it doesn't, then we'll have to see what issue phpBB ran itself into, and what we can do to help you out.
Are you trying to delete old stuff because it's old, or are you out of PM space?
Tech mutterings: Oh, the joys of using MySQL in production...
Re: ERROR deleting messages.
Posted: Tue Oct 06, 2020 3:41 am
by Plarz
Go ahead and retry at your convenience. I think I resolved the issue and you should be able to delete the messages now.
Re: ERROR deleting messages.
Posted: Tue Oct 06, 2020 2:11 pm
by smilbuta
Hello,
Yep it worked, Thanks!
I was simply doing house cleaning on old messages. Had plenty of space. All other folders allowed for bulk deletion except that one.
Re: ERROR deleting messages.
Posted: Wed Oct 07, 2020 1:48 am
by Plarz
smilbuta wrote: ↑Tue Oct 06, 2020 2:11 pm
Hello,
Yep it worked, Thanks!
I was simply doing house cleaning on old messages. Had plenty of space. All other folders allowed for bulk deletion except that one.
Cool, glad you're good to go. Thanks for the quick follow-up!
For those interested in the technical bits of what happened:
phpBB (for some reason) stored the number of messages in a folder in a table, rather than calculating it every time. Likely for speed, which makes sense. It somehow got out of sync, and the stored size was less than the number of messages that were actually in the folder. When it tried to zero out that stored size value, the calculation ended up as a negative number, which won't fit inside a column that's an unsigned integer (positive numbers only). So, the database errored out, phpBB panicked and we got the error message reported.
I solved it by manually setting that stored count of messages to the real number of messages in the folder. I used this solution for two reasons:
- If the operation failed again in normal use (when I asked smibuta to try again) then I'd know the issue was repeatable, and I could take it to phpBB as a bug. I would then have worked with smibuta to handle the issue in a more manual method (likely manually deleting things from the database), or left it until phpBB could help, if it's non-urgent.
- I don't know what extra steps phpBB takes under the hood when things get deleted, nor did I want to try and take the time to find out. For all I know, just deleting the messages manually could have weird consequences for the users who sent/received those messages. Safer to not mess with things unless I absolutely have to. That said, I did manually update the table in this case. However, it's one simple value, and easy to revert.
At this point, I'm considering this as a one-off fluke unless it happens again.
Re: [SOLVED] ERROR deleting messages.
Posted: Wed Oct 07, 2020 3:04 am
by tordeck
I just gotta comend Plarz on that AAR. Not many admins would bother to explain all that.