Topic on Project:Support desk

Fatal exception of type Wikimedia\Rdbms\DBQueryError after update upto 1.29.2

11
Ektip (talkcontribs)

Update mediawiki from 1.21 to 1.29.2 using web-interface.

Now i have error - [05575cfedebae9daa0d54bb3] 2017-11-18 21:45:24: Fatal exception of type Wikimedia\Rdbms\DBQueryError

Please advice.

星耀晨曦 (talkcontribs)

You should open debug options for more detailed error messages

$wgShowExceptionDetails = true;
$wgShowDBErrorBacktrace = true;
$wgShowSQLErrors = true;
Ektip (talkcontribs)

Here is:

[2cf16b067a21c4921aa451b1] / Wikimedia\Rdbms\DBQueryError from line 1075 of /home/httpd/vhosts/wiki.ektip.ru/httpdocs/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 lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'deps' LIMIT 1 
Function: LCStoreDB::get
Error: 1146 Table 'a201591_wikiek.l10n_cache' doesn't exist (a201591.mysql.mchost.ru)
Backtrace:

#0 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/libs/rdbms/database/Database.php(933): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#1 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/libs/rdbms/database/Database.php(1269): Wikimedia\Rdbms\Database->query(string, string)
#2 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/libs/rdbms/database/Database.php(1095): Wikimedia\Rdbms\Database->select(string, string, array, string, array)
#3 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/cache/localisation/LCStoreDB.php(53): Wikimedia\Rdbms\Database->selectField(string, string, array, string)
#4 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/cache/localisation/LocalisationCache.php(414): LCStoreDB->get(string, string)
#5 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/cache/localisation/LocalisationCache.php(460): LocalisationCache->isExpired(string)
#6 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/cache/localisation/LocalisationCache.php(379): LocalisationCache->initLanguage(string)
#7 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/cache/localisation/LocalisationCache.php(294): LocalisationCache->loadSubitem(string, string, string)
#8 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/languages/Language.php(2582): LocalisationCache->getSubitem(string, string, string)
#9 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/cache/MessageCache.php(918): Language->getMessage(string)
#10 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/cache/MessageCache.php(873): MessageCache->getMessageForLang(Language, string, boolean, array)
#11 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/cache/MessageCache.php(814): MessageCache->getMessageFromFallbackChain(Language, string, boolean)
#12 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/Message.php(1275): MessageCache->get(string, boolean, Language)
#13 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/Message.php(842): Message->fetchMessage()
#14 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/Message.php(934): Message->toString(string)
#15 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/title/MalformedTitleException.php(49): Message->text()
#16 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/title/MediaWikiTitleCodec.php(312): MalformedTitleException->__construct(string, string)
#17 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/Title.php(3415): MediaWikiTitleCodec->splitTitleString(string, integer)
#18 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/Title.php(355): Title->secureAndSplit()
#19 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/MediaWiki.php(84): Title::newFromURL(NULL)
#20 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/MediaWiki.php(140): MediaWiki->parseTitle()
#21 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/MediaWiki.php(777): MediaWiki->getTitle()
#22 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/includes/MediaWiki.php(523): MediaWiki->main()
#23 /home/httpd/vhosts/wiki.ektip.ru/httpdocs/index.php(43): MediaWiki->run()
#24 {main}
Ektip (talkcontribs)

'

AhmadF.Cheema (talkcontribs)
2003:CC:ABE4:6400:19F2:D209:921:4DC9 (talkcontribs)
Bawolff (talkcontribs)

Update.php (or the web updater by going to mywiki.com/w/mw-config ) will add the table for you, so there is no need to add it manually.

However, this table has been included since MediaWiki 1.16, so unless you are upgrading from pre-1.16, this means that random tables are disappearing from your db. That generally is very bad and you should figure out how that happened.

Jörgi123 (talkcontribs)

But isn't update.php using the different patch files, which always contain only a small chunk of the complete table structure? Does it really also add tables, which should already have been there?

Bawolff (talkcontribs)

It adds tables that should be there provided they were introduced after MediaWiki 1.5 (The update script doesn't know if the table is "missing" or if you are just upgrading from a really really old version of MediaWiki).

So it will work for l10n_cache table. It wouldn't work for say the querycache table

Ud121 (talkcontribs)

In my case, what should i do?

MediaWiki internal error.

Original exception: [a31016cf1565473645eb2172] /index.php Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.

Error 1146: Table 'my_wiki.l10n_cache' doesn't exist Function: LCStoreDB::get Query: SELECT lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'deps' LIMIT 1

Backtrace: from /var/www/html/includes/libs/rdbms/database/Database.php(1236)

  1. 0 /var/www/html/includes/libs/rdbms/database/Database.php(1220): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
  2. 1 /var/www/html/includes/libs/rdbms/database/Database.php(1194): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
  3. 2 /var/www/html/includes/libs/rdbms/database/Database.php(679): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  4. 3 /var/www/html/includes/libs/rdbms/database/Database.php(1383): Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
  5. 4 /var/www/html/includes/libs/rdbms/database/Database.php(1334): Wikimedia\Rdbms\Database->select(array, string, array, string, array, array)
  6. 5 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(119): Wikimedia\Rdbms\Database->selectField(array, string, array, string, array, array)
  7. 6 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(338): Wikimedia\Rdbms\DBConnRef->__call(string, array)
  8. 7 /var/www/html/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(726): Wikimedia\Rdbms\DBConnRef->selectField(array, string, array, string, array, array)
  9. 8 /var/www/html/includes/language/LCStoreDB.php(65): Wikimedia\Rdbms\SelectQueryBuilder->fetchField()
  10. 9 /var/www/html/includes/language/LocalisationCache.php(559): LCStoreDB->get(string, string)
  11. 10 /var/www/html/includes/language/LocalisationCache.php(606): LocalisationCache->isExpired(string)
  12. 11 /var/www/html/includes/language/LocalisationCache.php(516): LocalisationCache->initLanguage(string)
  13. 12 /var/www/html/includes/language/LocalisationCache.php(396): LocalisationCache->loadSubitem(string, string, string)
  14. 13 /var/www/html/includes/language/LocalisationCache.php(412): LocalisationCache->getSubitem(string, string, string)
  15. 14 /var/www/html/includes/language/MessageCache.php(1235): LocalisationCache->getSubitemWithSource(string, string, string)
  16. 15 /var/www/html/includes/language/MessageCache.php(1177): MessageCache->getMessageForLang(LanguageEn, string, boolean, array)
  17. 16 /var/www/html/includes/language/MessageCache.php(1075): MessageCache->getMessageFromFallbackChain(LanguageEn, string, boolean)
  18. 17 /var/www/html/includes/language/Message.php(1485): MessageCache->get(string, boolean, LanguageEn)
  19. 18 /var/www/html/includes/language/Message.php(972): Message->fetchMessage()
  20. 19 /var/www/html/includes/language/Message.php(1059): Message->format(string)
  21. 20 /var/www/html/includes/title/MalformedTitleException.php(61): Message->text()
  22. 21 /var/www/html/includes/title/MediaWikiTitleCodec.php(101): MediaWiki\Title\MalformedTitleException->__construct(string, string, array)
  23. 22 /var/www/html/includes/title/MediaWikiTitleCodec.php(411): MediaWiki\Title\MediaWikiTitleCodec::MediaWiki\Title\{closure}(string, string)
  24. 23 /var/www/html/includes/title/Title.php(2756): MediaWiki\Title\MediaWikiTitleCodec->splitTitleString(string, integer)
  25. 24 /var/www/html/includes/title/Title.php(510): MediaWiki\Title\Title->secureAndSplit(string)
  26. 25 /var/www/html/includes/MediaWiki.php(100): MediaWiki\Title\Title::newFromURL(string)
  27. 26 /var/www/html/includes/MediaWiki.php(189): MediaWiki->parseTitle(MediaWiki\Request\WebRequest)
  28. 27 /var/www/html/includes/MediaWiki.php(908): MediaWiki->getTitle()
  29. 28 /var/www/html/includes/MediaWiki.php(613): MediaWiki->main()
  30. 29 /var/www/html/index.php(50): MediaWiki->run()
  31. 30 /var/www/html/index.php(46): wfIndexMain()
  32. 31 {main}

Exception caught inside exception handler: [a31016cf1565473645eb2172] /index.php Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.

Error 1146: Table 'my_wiki.page' doesn't exist Function: MessageCache::loadFromDB(en-gb)-big Query: SELECT page_title,page_latest FROM `page` WHERE page_is_redirect = 0 AND page_namespace = 8 AND (page_title NOT LIKE '%/%' ESCAPE '`' ) AND (page_len > 10000)

Backtrace: from /var/www/html/includes/libs/rdbms/database/Database.php(1236)

  1. 0 /var/www/html/includes/libs/rdbms/database/Database.php(1220): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
  2. 1 /var/www/html/includes/libs/rdbms/database/Database.php(1194): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
  3. 2 /var/www/html/includes/libs/rdbms/database/Database.php(679): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  4. 3 /var/www/html/includes/libs/rdbms/database/Database.php(1383): Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
  5. 4 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(119): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
  6. 5 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(351): Wikimedia\Rdbms\DBConnRef->__call(string, array)
  7. 6 /var/www/html/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(708): Wikimedia\Rdbms\DBConnRef->select(array, array, array, string, array, array)
  8. 7 /var/www/html/includes/language/MessageCache.php(606): Wikimedia\Rdbms\SelectQueryBuilder->fetchResultSet()
  9. 8 /var/www/html/includes/language/MessageCache.php(504): MessageCache->loadFromDB(string, NULL)
  10. 9 /var/www/html/includes/language/MessageCache.php(421): MessageCache->loadFromDBWithMainLock(string, array, NULL)
  11. 10 /var/www/html/includes/language/MessageCache.php(341): MessageCache->loadUnguarded(string, NULL)
  12. 11 /var/www/html/includes/language/MessageCache.php(1301): MessageCache->load(string)
  13. 12 /var/www/html/includes/language/MessageCache.php(1206): MessageCache->getMsgFromNamespace(string, string)
  14. 13 /var/www/html/includes/language/MessageCache.php(1177): MessageCache->getMessageForLang(Language, string, boolean, array)
  15. 14 /var/www/html/includes/language/MessageCache.php(1075): MessageCache->getMessageFromFallbackChain(Language, string, boolean)
  16. 15 /var/www/html/includes/language/Message.php(1485): MessageCache->get(string, boolean, Language)
  17. 16 /var/www/html/includes/language/Message.php(972): Message->fetchMessage()
  18. 17 /var/www/html/includes/language/Message.php(1059): Message->format(string)
  19. 18 /var/www/html/includes/exception/MWExceptionRenderer.php(254): Message->text()
  20. 19 /var/www/html/includes/exception/MWExceptionRenderer.php(191): MWExceptionRenderer::msg(string, string)
  21. 20 /var/www/html/includes/exception/MWExceptionRenderer.php(105): MWExceptionRenderer::reportHTML(Wikimedia\Rdbms\DBQueryError)
  22. 21 /var/www/html/includes/exception/MWExceptionHandler.php(134): MWExceptionRenderer::output(Wikimedia\Rdbms\DBQueryError, integer)
  23. 22 /var/www/html/includes/exception/MWExceptionHandler.php(251): MWExceptionHandler::report(Wikimedia\Rdbms\DBQueryError)
  24. 23 /var/www/html/includes/MediaWiki.php(632): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBQueryError, string)
  25. 24 /var/www/html/index.php(50): MediaWiki->run()
  26. 25 /var/www/html/index.php(46): wfIndexMain()
  27. 26 {main}

Also, run `php update.php` inside /var/www/html/maintenance directory.

Required help...

Bawolff (talkcontribs)

Please start a new thread. It is unlikely your issue has the same cause as the other one reported here

Reply to "Fatal exception of type Wikimedia\Rdbms\DBQueryError after update upto 1.29.2"