Page MenuHomePhabricator

MSSQL installation doesn't recognize objectcache or l10n_cache tables
Closed, DuplicatePublic

Description

After we got MW installed (see T192965), MediaWiki wouldn't work. Visiting the page would end up with an error:

[c032b5a46de7da3a0ff9d8c9] 2018-04-24 20:06:51: Fatal exception of type Wikimedia\Rdbms\DBQueryError

on an otherwise empty page. Adding a debug log and we got the following as the last thing recorded:

[SQLBagOStuff] Duplicate get(): "DBNAME:messages:en" fetched 3 times
[SQLBagOStuff] Duplicate get(): "DBNAME:messages:en:status" fetched 3 times
[SQLBagOStuff] Duplicate get(): "DBNAME:messages:en:lock" fetched 3 times
[DBQuery] DBNAME SELECT /* LCStoreDB::get  */ TOP 1  lc_value  FROM [l10n_cache]    WHERE lc_lang = 'en' AND lc_key = 'messages:title-invalid-empty'  
[DBQuery] SQL ERROR: [SQLSTATE 42S02][Error Code 208][Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid object name 'l10n_cache'.
[SQLSTATE 42000][Error Code 8180][Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Statement(s) could not be prepared.
 
 
[exception] [52606319bb248016995a2c8f] /   Wikimedia\Rdbms\DBQueryError from line 1149 of C:...includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SELECT TOP 1  lc_value  FROM [l10n_cache]    WHERE lc_lang = 'en' AND lc_key = 'messages:title-invalid-empty'  
Function: LCStoreDB::get
Error: 208 [SQLSTATE 42S02][Error Code 208][Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid object name 'l10n_cache'.
[SQLSTATE 42000][Error Code 8180][Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Statement(s) could not be prepared.
 
 
#0 C:...includes\libs\rdbms\database\Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#1 C:...includes\libs\rdbms\database\DatabaseMssql.php(414): Wikimedia\Rdbms\Database->query(string, string)
#2 C:...includes\libs\rdbms\database\Database.php(1169): Wikimedia\Rdbms\DatabaseMssql->select(string, string, array, string, array, array)
#3 C:...includes\cache\localisation\LCStoreDB.php(52): Wikimedia\Rdbms\Database->selectField(string, string, array, string)
#4 C:...includes\cache\localisation\LocalisationCache.php(392): LCStoreDB->get(string, string)
#5 C:...includes\cache\localisation\LocalisationCache.php(291): LocalisationCache->loadSubitem(string, string, string)
#6 C:...languages\Language.php(2587): LocalisationCache->getSubitem(string, string, string)
#7 C:...includes\cache\MessageCache.php(933): Language->getMessage(string)
#8 C:...includes\cache\MessageCache.php(888): MessageCache->getMessageForLang(LanguageEn, string, boolean, array)
#9 C:...includes\cache\MessageCache.php(828): MessageCache->getMessageFromFallbackChain(LanguageEn, string, boolean)
#10 C:...includes\Message.php(1275): MessageCache->get(string, boolean, LanguageEn)
#11 C:...includes\Message.php(842): Message->fetchMessage()
#12 C:...includes\Message.php(934): Message->toString(string)
#13 C:...includes\title\MalformedTitleException.php(49): Message->text()
#14 C:...includes\title\MediaWikiTitleCodec.php(311): MalformedTitleException->__construct(string, string)
#15 C:...includes\Title.php(3526): MediaWikiTitleCodec->splitTitleString(string, integer)
#16 C:...includes\Title.php(361): Title->secureAndSplit()
#17 C:...includes\MediaWiki.php(84): Title::newFromURL(NULL)
#18 C:...includes\MediaWiki.php(140): MediaWiki->parseTitle()
#19 C:...includes\MediaWiki.php(920): MediaWiki->getTitle()
#20 C:...includes\MediaWiki.php(900): MediaWiki->triggerJobs()
#21 C:...includes\MediaWiki.php(719): MediaWiki->restInPeace(string, boolean)
#22 C:...includes\MediaWiki.php(740): MediaWiki->{closure}()
#23 C:...includes\MediaWiki.php(553): MediaWiki->doPostOutputShutdown(string)
#24 C:...index.php(43): MediaWiki->run()
#25 {main}
[session] Saving all sessions on shutdown
[DBConnection] Closing connection to database 'localhost'.
[DBConnection] Closing connection to database 'localhost'.

Event Timeline

Vvjjkkii renamed this task from MSSQL installation doesn't recognize objectcache or l10n_cache tables to 5aeaaaaaaa.Jul 1 2018, 1:14 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
AfroThundr3007730 renamed this task from 5aeaaaaaaa to MSSQL installation doesn't recognize objectcache or l10n_cache tables.Jul 1 2018, 6:54 AM
AfroThundr3007730 raised the priority of this task from High to Needs Triage.
AfroThundr3007730 updated the task description. (Show Details)
AfroThundr3007730 added a subscriber: Aklapper.

Merging into T192965. If the installation was aborted by an error, the page will not work after that as any tables that would be created after the point it failed would naturally be missing.