Page 1 of 1

Forum MySQL error

Posted: Sun Jun 24, 2012 10:13 pm
by Firejack
Anyone got any clue of the cause or importance of this error that cropped up tonight?
General Error
SQL ERROR [ mysqli ]

Table './tngcweb_phpbb3/phpbb_posts' is marked as crashed and should be repaired [145]

SQL

SELECT COUNT(post_id) AS total FROM phpbb_posts WHERE forum_id IN (0, 85, 86, 87, 36, 2, 29, 5, 43, 84, 81, 73, 7, 13, 3, 27, 55, 16, 32, 15, 30, 77, 61, 75, 76, 80, 88, 82, 17, 83, 22, 65, 74, 42, 20, 58, 23, 33, 62, 63, 35, 34, 57, 12, 40, 41, 18, 66, 67, 68, 8, 60, 64, 72, 71, 70, 69, 9, 78, 79) AND post_approved = 0

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/mcp/mcp_front.php
LINE: 44
CALL: dbal_mysqli->sql_query()

FILE: includes/mcp/mcp_main.php
LINE: 143
CALL: mcp_front_view()

FILE: includes/functions_module.php
LINE: 507
CALL: mcp_main->main()

FILE: mcp.php
LINE: 244
CALL: p_master->load_active()
I look in phpMyAdmin and saw that table was "In Use" so I selected it and hit repair and got
Table Op Msg_type Msg_text
tngcweb_phpbb3.phpbb_posts repair info Found block that points outside data file at 39894...
tngcweb_phpbb3.phpbb_posts repair info Found block that points outside data file at 39894...
tngcweb_phpbb3.phpbb_posts repair info Found block that points outside data file at 39894...
tngcweb_phpbb3.phpbb_posts repair status OK
I have no clue on databases.... any with more knowledge know if we should be worried or its fixed now?

Re: Forum MySQL error

Posted: Mon Jun 25, 2012 7:58 am
by AmigaFan2003
Sounds like one of the idexes was corrupt on the table.

Next time before running a repair do a

Code: Select all

check table tablename 
and it'll probably return something like

Code: Select all

tablename | check | error    | Found wrong record at nnnnnnnnn |
tablename | check | error    | Corrupt                         |
You did the right thing in repairing the table, although it's a good idea to back it up first :-)

Re: Forum MySQL error

Posted: Mon Jun 25, 2012 8:54 am
by Caldazar
Forum acted up for me even after you posted this, with slow loading times, and timeouts. It seems a lot better now though.

Probably irrelevant but just thought I'd let you know incase something else is failing

Re: Forum MySQL error

Posted: Mon Jun 25, 2012 5:25 pm
by Firejack
There was an update for phpBB. So I've updated the forums from 3.0.9 to 3.0.10. The updater did some "optimising" for the database. Says it was successful so maybe there were a few others issues that needed to be cleaned up.

As always report any problem you spot with the forums promptly!

Re: Forum MySQL error

Posted: Wed Jun 27, 2012 10:35 pm
by Fennris
Forums seem a bit sluggish tonight and a few of the thread alert buttons reactivated themselves with no new content to warrant the alert though that might be my cookies, I have been messing about with them today.