Page MenuHomeMiraheze

DBQueryError after 1.37 upgrade
Closed, ResolvedPublic

Description

I found a weird bug in one of the wikis on the farm (called Wikimodels, the one I am a bureaucrat on):

Screenshot 2021-12-07 181437.png (222×1 px, 20 KB)

Error occuring: [137cf04fb83d809c6b118a25] 2021-12-07 19:44:36: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"
This is a bug across my wiki. I had to set the priority to unbreak now.

Related Objects

Event Timeline

TylerMagee triaged this task as Unbreak Now! priority.Dec 7 2021, 18:20
TylerMagee created this task.
Agent_Isai lowered the priority of this task from Unbreak Now! to Normal.Dec 7 2021, 18:21

Miraheze is upgrading to MediaWiki 1.37 at this current moment. Database errors are to be expected and this will likely be fixed by the end of the upgrade.

TylerMagee lowered the priority of this task from Normal to Low.Dec 7 2021, 18:22
TylerMagee raised the priority of this task from Low to Normal.

This continues even after the upgrade. I cannot find a way to fix this.

TylerMagee raised the priority of this task from Normal to Unbreak Now!.Dec 7 2021, 19:46

@TylerMagee Which wiki is this? Can you paste the exact error? (Rather than screenshot)

Error 1176: Key 'page_name_title' doesn't exist in table 'page' (db12)
Function: SpecialPrefixindex::showPrefixChunk
Query: SELECT  page_namespace,page_title,page_id,page_len,page_is_redirect,page_latest,page_restrictions,page_content_model,page_lang  FROM `page`  FORCE INDEX (page_name_title)  WHERE page_namespace = 4 AND (page_title LIKE 'Model`_reports/%' ESCAPE '`' ) AND (page_title >= '')  ORDER BY page_title LIMIT 346
from /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1809)
#0 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1793): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1768): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1327): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(2012): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 /srv/mediawiki/w/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->select(string, array, array, string, array)
#5 /srv/mediawiki/w/includes/libs/rdbms/database/DBConnRef.php(324): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#6 /srv/mediawiki/w/includes/specials/SpecialPrefixindex.php(205): Wikimedia\Rdbms\DBConnRef->select(string, array, array, string, array)
#7 /srv/mediawiki/w/includes/specials/SpecialPrefixindex.php(103): SpecialPrefixindex->showPrefixChunk(integer, string, string)
#8 /srv/mediawiki/w/includes/specialpage/SpecialPage.php(647): SpecialPrefixindex->execute(string)
#9 /srv/mediawiki/w/includes/specialpage/SpecialPageFactory.php(1366): SpecialPage->run(string)
#10 /srv/mediawiki/w/includes/specialpage/SpecialPageFactory.php(1428): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext, boolean, MediaWiki\Linker\LinkRenderer)
#11 /srv/mediawiki/w/includes/parser/Parser.php(3189): MediaWiki\SpecialPage\SpecialPageFactory->capturePath(Title, RequestContext, MediaWiki\Linker\LinkRenderer)
#12 /srv/mediawiki/w/includes/parser/PPFrame_Hash.php(273): Parser->braceSubstitution(array, PPFrame_Hash)
#13 /srv/mediawiki/w/includes/parser/Parser.php(2930): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#14 /srv/mediawiki/w/includes/parser/Parser.php(1598): Parser->replaceVariables(string)
#15 /srv/mediawiki/w/includes/parser/Parser.php(656): Parser->internalParse(string)
#16 /srv/mediawiki/w/includes/content/WikitextContent.php(327): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#17 /srv/mediawiki/w/includes/content/AbstractContent.php(548): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#18 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(263): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#19 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#20 /srv/mediawiki/w/includes/Revision/RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#21 /srv/mediawiki/w/includes/Revision/RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#22 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#23 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#24 /srv/mediawiki/w/includes/poolcounter/PoolWorkArticleView.php(137): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#25 /srv/mediawiki/w/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()
#26 /srv/mediawiki/w/includes/page/ParserOutputAccess.php(281): PoolCounterWork->execute()
#27 /srv/mediawiki/w/includes/page/Article.php(691): MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreCacheRecord, integer)
#28 /srv/mediawiki/w/includes/page/Article.php(506): Article->generateContentOutput(User, ParserOptions, integer, OutputPage, array)
#29 /srv/mediawiki/w/includes/actions/ViewAction.php(74): Article->view()
#30 /srv/mediawiki/w/includes/MediaWiki.php(538): ViewAction->show()
#31 /srv/mediawiki/w/includes/MediaWiki.php(320): MediaWiki->performAction(Article, Title)
#32 /srv/mediawiki/w/includes/MediaWiki.php(925): MediaWiki->performRequest()
#33 /srv/mediawiki/w/includes/MediaWiki.php(559): MediaWiki->main()
#34 /srv/mediawiki/w/index.php(53): MediaWiki->run()
#35 /srv/mediawiki/w/index.php(46): wfIndexMain()
#36 {main}
Reception123 renamed this task from Fatal miraheze data base error. to DBQueryError after 1.37 upgrade.Dec 7 2021, 19:55
Error 1176: Key 'page_name_title' doesn't exist in table 'page' (db12)
Function: SpecialPrefixindex::showPrefixChunk
Query: SELECT  page_namespace,page_title,page_id,page_len,page_is_redirect,page_latest,page_restrictions,page_content_model,page_lang  FROM `page`  FORCE INDEX (page_name_title)  WHERE page_namespace = 4 AND (page_title LIKE 'Model`_reports/%' ESCAPE '`' ) AND (page_title >= '')  ORDER BY page_title LIMIT 346
from /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1809)
#0 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1793): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1768): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1327): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(2012): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 /srv/mediawiki/w/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->select(string, array, array, string, array)
#5 /srv/mediawiki/w/includes/libs/rdbms/database/DBConnRef.php(324): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#6 /srv/mediawiki/w/includes/specials/SpecialPrefixindex.php(205): Wikimedia\Rdbms\DBConnRef->select(string, array, array, string, array)
#7 /srv/mediawiki/w/includes/specials/SpecialPrefixindex.php(103): SpecialPrefixindex->showPrefixChunk(integer, string, string)
#8 /srv/mediawiki/w/includes/specialpage/SpecialPage.php(647): SpecialPrefixindex->execute(string)
#9 /srv/mediawiki/w/includes/specialpage/SpecialPageFactory.php(1366): SpecialPage->run(string)
#10 /srv/mediawiki/w/includes/specialpage/SpecialPageFactory.php(1428): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext, boolean, MediaWiki\Linker\LinkRenderer)
#11 /srv/mediawiki/w/includes/parser/Parser.php(3189): MediaWiki\SpecialPage\SpecialPageFactory->capturePath(Title, RequestContext, MediaWiki\Linker\LinkRenderer)
#12 /srv/mediawiki/w/includes/parser/PPFrame_Hash.php(273): Parser->braceSubstitution(array, PPFrame_Hash)
#13 /srv/mediawiki/w/includes/parser/Parser.php(2930): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#14 /srv/mediawiki/w/includes/parser/Parser.php(1598): Parser->replaceVariables(string)
#15 /srv/mediawiki/w/includes/parser/Parser.php(656): Parser->internalParse(string)
#16 /srv/mediawiki/w/includes/content/WikitextContent.php(327): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#17 /srv/mediawiki/w/includes/content/AbstractContent.php(548): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#18 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(263): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#19 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#20 /srv/mediawiki/w/includes/Revision/RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#21 /srv/mediawiki/w/includes/Revision/RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#22 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#23 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#24 /srv/mediawiki/w/includes/poolcounter/PoolWorkArticleView.php(137): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#25 /srv/mediawiki/w/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()
#26 /srv/mediawiki/w/includes/page/ParserOutputAccess.php(281): PoolCounterWork->execute()
#27 /srv/mediawiki/w/includes/page/Article.php(691): MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreCacheRecord, integer)
#28 /srv/mediawiki/w/includes/page/Article.php(506): Article->generateContentOutput(User, ParserOptions, integer, OutputPage, array)
#29 /srv/mediawiki/w/includes/actions/ViewAction.php(74): Article->view()
#30 /srv/mediawiki/w/includes/MediaWiki.php(538): ViewAction->show()
#31 /srv/mediawiki/w/includes/MediaWiki.php(320): MediaWiki->performAction(Article, Title)
#32 /srv/mediawiki/w/includes/MediaWiki.php(925): MediaWiki->performRequest()
#33 /srv/mediawiki/w/includes/MediaWiki.php(559): MediaWiki->main()
#34 /srv/mediawiki/w/index.php(53): MediaWiki->run()
#35 /srv/mediawiki/w/index.php(46): wfIndexMain()
#36 {main}

Does this code have any problems? If yes, I will delete "wikee" from my github as it is a fork, and again fork mediawiki to fix the issue.

TylerMagee claimed this task.

Fixed:

Screenshot 2021-12-07 195910.png (1×1 px, 211 KB)

All The Tropes is having the same error on any attempt to edit or create a page.

@Looney_Toons This should hopefully be fixed when all SQL patches are ran.

Unknown Object (User) claimed this task.Dec 7 2021, 20:59