For at least the last half hour or so (since ca 4:00 pm PST) and perhaps longer, special:RecentChanges has been spewing out an error instead of links:
Warning: Supplied argument is not a valid MySQL result resource in /home/wiki-newest/work-http/special_recentchanges.php on line 82
Warning: Supplied argument is not a valid MySQL result resource in /home/wiki-newest/work-http/special_recentchanges.php on line 83
This is the main query, which when I try it manually via special:AskSQL as:
SELECT cur_timestamp, cur_title, cur_comment, cur_user, cur_user_text, cur_minor_edit, COUNT(old_id) + (IF(cur_minor_edit = 2,0,1)) AS changes FROM cur LEFT OUTER JOIN old ON cur_title = old_title AND old_timestamp > SUBDATE(CURRENT_TIMESTAMP, INTERVAL 2 DAY) AND old_minor_edit <> 2 WHERE cur_timestamp > SUBDATE(CURRENT_TIMESTAMP, INTERVAL 2 DAY) GROUP BY cur_title ORDER BY cur_timestamp DESC LIMIT 250
I got this MySQL error message: "Got error 127 from table handler". Well, I don't know what it means, but there it is.
Apparently (http://www.mysqldeveloper.com/faqs/index.pcgi?id=40) this means: What does "Got error 127 from table handler" mean This error literally means: Record-file is crashed
To correct this error; simply run myisamchk or REPAIR <tbl>; against that table.
(Note that in order to get the possibly useful MySQL error message when a query goes wrong, you have to explicitly check the return values from the database calls and then return the string from mysql_error(); by default, all PHP gives you is the complaint about invalid result resources when the return code from a query is used in another call.)
-- brion vibber (brion @ pobox.com)
Brion L. VIBBER wrote:
I got this MySQL error message: "Got error 127 from table handler". Well, I don't know what it means, but there it is.
Apparently (http://www.mysqldeveloper.com/faqs/index.pcgi?id=40) this means: What does "Got error 127 from table handler" mean This error literally means: Record-file is crashed
To correct this error; simply run myisamchk or REPAIR <tbl>; against that table.
So I have run this: # myisamchk -r /usr/local/var/wikipedia/cur - recovering (with sort) MyISAM-table '/usr/local/var/wikipedia/cur.MYI' Data records: 347 - Fixing index 1 - Fixing index 2 - Fixing index 3
And this seems to have not fixed anything.
I'm a little vague on how to run REPAIR <tbl>; against that table.
I mean, look at this please:
[root@ross /root]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 65 to server version: 3.23.37
Type 'help;' or '\h' for help. Type '\c' to clear the buffer
mysql> use wiki; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Didn't find any fields in table 'cur' Database changed mysql> repair cur; ERROR 1064: You have an error in your SQL syntax near 'cur' at line 1 mysql>
So this suggests that I don't understand.
--Jimbo
wikitech-l@lists.wikimedia.org