[Mediawiki-l] mediawiki 1.9.3 error (objectcache?)

lonelyprophet at hotmail.com lonelyprophet at hotmail.com
Wed May 16 10:15:42 UTC 2007

Hi, I'm having real problems with my mediawiki database.
I'm using 1.9.3, with MySQL 5.0.27-standard, and PHP 5.2.1

The problem is in two stages:

1. The following error appeared, suddenly and unexpectedly. No upgrades to 
the DB aside from entries/edits being made to the wiki, and no changes to 
the php files or anything else in the directory where the wiki is installed.

Original exception: exception 'DBQueryError' with message 'A database error 
has occurred Query: SELECT value,exptime FROM `objectcache` WHERE 
keyname='DBNAME:messages-hash' Function: MediaWikiBagOStuff::_doquery Error: 
1033 Incorrect information in file: './DBNAME/objectcache.frm' (localhost) ' 
in /DBLOCATION/includes/Database.php:708 Stack trace:
0 /DBLOCATION/includes/Database.php(665): 
Database->reportQueryError('Incorrect infor...', 1033, 'SELECT value,ex...', 
'MediaWikiBagOSt...', false)
1 /DBLOCATION/includes/BagOStuff.php(396): Database->query('SELECT 
value,ex...', 'MediaWikiBagOSt...')
2 /DBLOCATION/includes/BagOStuff.php(296): 
MediaWikiBagOStuff->_doquery('SELECT value,ex...')
3 /DBLOCATION/includes/BagOStuff.php(236): SqlBagOStuff->_query('SELECT 
value,ex...', 'DBNAME...')
4 /DBLOCATION/includes/MessageCache.php(206): SqlBagOStuff->get('DBNAME...')
5 /DBLOCATION/includes/MessageCache.php(442): MessageCache->load()
6 /DBLOCATION/includes/GlobalFunctions.php(420): 
MessageCache->get('mainpage', true, true)
7 /DBLOCATION/includes/GlobalFunctions.php(379): wfMsgGetKey('mainpage', 
true, true, true)
8 /DBLOCATION/includes/GlobalFunctions.php(328): wfMsgReal('mainpage', 
Array, true, true)
9 /DBLOCATION/includes/Title.php(275): wfMsgForContent()
10 /DBLOCATION/includes/Wiki.php(74): Title::newMainPage('mainpage')
11 /DBLOCATION/index.php(17): MediaWiki->checkInitialQueries()
12 {main}

Exception caught inside exception handler: exception 'DBUnexpectedError' 
with message 'Error in fetchObject(): Incorrect information in file: 
'./DBNAME/page.frm' (localhost)' in /DBLOCATION/includes/Database.php:825 
Stack trace:
0 /DBLOCATION/includes/MessageCache.php(315): Database->fetchObject(false)
1 /DBLOCATION/includes/MessageCache.php(252): MessageCache->loadFromDB()
2 /DBLOCATION/includes/MessageCache.php(442): MessageCache->load()
3 /DBLOCATION/includes/GlobalFunctions.php(420): 
MessageCache->get('databaseerror', true, false)
4 /DBLOCATION/includes/GlobalFunctions.php(379): 
wfMsgGetKey('databaseerror', true, false, true)
5 /DBLOCATION/includes/Exception.php(18): wfMsgReal('databaseerror', Array)
6 /DBLOCATION/includes/Database.php(212): MWException->msg('databaseerror', 
'Database error')
7 /DBLOCATION/includes/Exception.php(109): DBQueryError->getPageTitle()
8 /DBLOCATION/includes/Exception.php(76): MWException->htmlHeader()
9 /DBLOCATION/includes/Exception.php(95): MWException->reportHTML()
10 /DBLOCATION/includes/Exception.php(171): MWException->report()
11 /DBLOCATION/includes/Exception.php(205): wfReportException()
12 [internal function]: wfExceptionHandler(Object(DBQueryError))
13 {main}

Paths renamed for security reasons. When I checked out the DB and tried to 
repair it (which didn't work) I saw that the table objectcache was giving 
out an SQL #1033 error. So, I figured that was the problem.

2. I tried truncating the objectcache table, but got the #1033 error again. 
So, I dropped the table and recreated it using the following SQL:

DROP TABLE IF EXISTS `objectcache`;
CREATE TABLE `objectcache` (
`keyname` char(255) character set latin1 collate latin1_bin NOT NULL default 
`value` mediumblob,
`exptime` datetime default NULL,
UNIQUE KEY `keyname` (`keyname`),
KEY `exptime` (`exptime`)

I'm now getting the following error:

Database error
A database query syntax error has occurred. This may indicate a bug in the 
software. The last attempted database query was:
(SQL query hidden)
from within function "MessageCache::loadFromDB". MySQL returned error "1033: 
Incorrect information in file: './DBNAME/page.frm' (localhost)".

The last part of this statement seems to change randomly between page.frm, 
user.frm and job.frm

I have checked my backup of the SQL database and it seems the content under
-- Dumping data for table `objectcache`
is all corrupted with lots of bizarre symbols etc. I tried entering it 
anyway, via the statement I saw in the backup .sql file I have:
LOCK TABLES `objectcache` WRITE;
/*!40000 ALTER TABLE `objectcache` DISABLE KEYS */;
INSERT INTO `objectcache` (`keyname`, `value`, `exptime`) VALUES

But, it made no difference.

Is there a way to fix this without losing all the content of the DB (i.e. 
the entries/articles and so on), or am I going to have to ditch the whole 
thing and start up again?

Thanks in advance!


More information about the MediaWiki-l mailing list