Page MenuHomePhabricator

SemanticMediaWiki tries to create temporary tables, but can't as wikiuser is restricted
Closed, DeclinedPublic

Description

2015-08-31 11:55:16 silver labswiki exception ERROR: [4098df2b] /wiki/Category:All_projects   DBQueryError from line 1131 of /srv/mediawiki/php-1.26wmf20/includes/db/Database.php: A database error has occurred. Did you forget to run maintenance/update.php after upgrading?  See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: CREATE TEMPORARY TABLE `t1`( id INT UNSIGNED KEY ) ENGINE=MEMORY
Function: SMW::executeHierarchyQuery
Error: 1044 Access denied for user 'wikiuser'@'208.80.154.136' to database 'labswiki' (208.80.154.136)
 {"exception":"[Exception DBQueryError] (/srv/mediawiki/php-1.26wmf20/includes/db/Database.php:1131) A database error has occurred. Did you forget to run maintenance/update.php after upgrading?  See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: CREATE TEMPORARY TABLE `t1`( id INT UNSIGNED KEY ) ENGINE=MEMORY
Function: SMW::executeHierarchyQuery
Error: 1044 Access denied for user 'wikiuser'@'208.80.154.136' to database 'labswiki' (208.80.154.136)

[stacktrace]
#0 /srv/mediawiki/php-1.26wmf20/includes/db/Database.php(1086): DatabaseBase->reportQueryError(string, integer, string, string, boolean)
#1 /srv/mediawiki/php-1.26wmf20/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_Queries.php(1024): DatabaseBase->query(string, string)
#2 /srv/mediawiki/php-1.26wmf20/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_Queries.php(965): SMWSQLStore3QueryEngine->executeHierarchyQuery(SMWSQLStore3Query)
#3 /srv/mediawiki/php-1.26wmf20/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_Queries.php(848): SMWSQLStore3QueryEngine->executeQueries(SMWSQLStore3Query)
#4 /srv/mediawiki/php-1.26wmf20/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_Queries.php(848): SMWSQLStore3QueryEngine->executeQueries(SMWSQLStore3Query)
#5 /srv/mediawiki/php-1.26wmf20/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_Queries.php(296): SMWSQLStore3QueryEngine->executeQueries(SMWSQLStore3Query)
#6 /srv/mediawiki/php-1.26wmf20/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(354): SMWSQLStore3QueryEngine->getQueryResult(SMWQuery)
#7 /srv/mediawiki/php-1.26wmf20/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php(505): SMWSQLStore3->getQueryResult(SMWQuery)
#8 /srv/mediawiki/php-1.26wmf20/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Ask.php(40): SMWQueryProcessor::getResultFromQuery(SMWQuery, array, integer, integer)
#9 [internal function]: SMWAsk::render(Parser, string, string, string, string, string, string)
#10 /srv/mediawiki/php-1.26wmf20/includes/parser/Parser.php(3790): call_user_func_array(array, array)
#11 /srv/mediawiki/php-1.26wmf20/includes/parser/Parser.php(3524): Parser->callParserFunction(PPFrame_DOM, string, array)
#12 /srv/mediawiki/php-1.26wmf20/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPFrame_DOM)
#13 /srv/mediawiki/php-1.26wmf20/includes/parser/Parser.php(3343): PPFrame_DOM->expand(PPNode_DOM, integer)
#14 /srv/mediawiki/php-1.26wmf20/includes/parser/Parser.php(1239): Parser->replaceVariables(string)
#15 /srv/mediawiki/php-1.26wmf20/includes/parser/Parser.php(439): Parser->internalParse(string)
#16 /srv/mediawiki/php-1.26wmf20/includes/content/WikitextContent.php(331): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#17 /srv/mediawiki/php-1.26wmf20/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#18 /srv/mediawiki/php-1.26wmf20/includes/poolcounter/PoolWorkArticleView.php(140): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#19 /srv/mediawiki/php-1.26wmf20/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#20 /srv/mediawiki/php-1.26wmf20/includes/page/Article.php(676): PoolCounterWork->execute()
#21 /srv/mediawiki/php-1.26wmf20/includes/page/CategoryPage.php(73): Article->view()
#22 /srv/mediawiki/php-1.26wmf20/includes/actions/ViewAction.php(44): CategoryPage->view()
#23 /srv/mediawiki/php-1.26wmf20/includes/MediaWiki.php(456): ViewAction->show()
#24 /srv/mediawiki/php-1.26wmf20/includes/MediaWiki.php(255): MediaWiki->performAction(CategoryTreeCategoryPage, Title)
#25 /srv/mediawiki/php-1.26wmf20/includes/MediaWiki.php(683): MediaWiki->performRequest()
#26 /srv/mediawiki/php-1.26wmf20/includes/MediaWiki.php(474): MediaWiki->main()
#27 /srv/mediawiki/php-1.26wmf20/index.php(41): MediaWiki->run()
#28 /srv/mediawiki/w/index.php(3): require(string)
#29 {main}
"}

wikiuser can only SELECT, INSERT, UPDATE and DELETE. Also, do we not have a SMW project on Phabricator?

Event Timeline

Krenair raised the priority of this task from to Needs Triage.
Krenair updated the task description. (Show Details)
Krenair added a subscriber: Krenair.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
chasemp added a subscriber: chasemp.

If this was me, I would close it as won't fix- this fails because the user doesn't have permissions to do CREATE TEMPORARY TABLE t1`( id INT UNSIGNED KEY ) ENGINE=MEMORY`. That is a terrible idea for many reasons, form security, to scaling (e.g. integrating it on the cluster). Before I ran into this ticket, I honestly thought wikitech had been compromised.

Maybe if the extension improves that can be reconsidered.

Bawolff added a subscriber: Bawolff.

If this was me, I would close it as won't fix

You are the DBA, if the status of this ticket is up to anyone, its up to you. Closing declined.

I think long term plan is T53642 anyways.