Last modified: 2013-03-20 18:14:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45229, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43229 - WikipageEntityLookup fails on setups that have a table prefix
WikipageEntityLookup fails on setups that have a table prefix
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataClient (Other open bugs)
master
All All
: High blocker (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-18 11:41 UTC by Jeroen De Dauw
Modified: 2013-03-20 18:14 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jeroen De Dauw 2012-12-18 11:41:28 UTC
This prevent me, or anyone else that has table prefixes, from using the client.

1) Wikibase\Test\WikipageEntityLookupTest::testGetEntity with data set #0 (0, 'foo')
DBQueryError: 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: SELECT  page.*, revision.*, text.*  FROM `unittest_wb_entity_per_page` INNER JOIN `unittest_page` ON ((epp_page_id=page_id)) INNER JOIN `unittest_revision` ON ((page_latest=rev_id)) INNER JOIN `unittest_text` ON ((old_id=rev_text_id))  WHERE epp_entity_id = '1' AND epp_entity_type = 'item'  
Function: Wikibase\WikiPageEntityLookup::getEntity
Error: 1051 Unknown table 'page' (localhost)


/home/j/www/phase3/includes/db/Database.php:1016
/home/j/www/phase3/includes/db/Database.php:982
/home/j/www/phase3/includes/db/Database.php:1407
/home/j/www/phase3/extensions/Wikibase/lib/includes/store/WikiPageEntityLookup.php:185
/home/j/www/phase3/extensions/Wikibase/lib/tests/phpunit/store/WikiPageEntityLookupTest.php:146
/home/j/www/phase3/tests/phpunit/MediaWikiTestCase.php:116
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:60
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:46

2) Wikibase\Test\WikipageEntityLookupTest::testGetEntity with data set #1 (1, 'foo')
DBQueryError: 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: SELECT  page.*, revision.*, text.*  FROM `unittest_wb_entity_per_page` INNER JOIN `unittest_page` ON ((epp_page_id=page_id)) INNER JOIN `unittest_revision` ON ((page_latest=rev_id)) INNER JOIN `unittest_text` ON ((old_id=rev_text_id))  WHERE epp_entity_id = '1' AND epp_entity_type = 'item'  
Function: Wikibase\WikiPageEntityLookup::getEntity
Error: 1051 Unknown table 'page' (localhost)


/home/j/www/phase3/includes/db/Database.php:1016
/home/j/www/phase3/includes/db/Database.php:982
/home/j/www/phase3/includes/db/Database.php:1407
/home/j/www/phase3/extensions/Wikibase/lib/includes/store/WikiPageEntityLookup.php:185
/home/j/www/phase3/extensions/Wikibase/lib/tests/phpunit/store/WikiPageEntityLookupTest.php:146
/home/j/www/phase3/tests/phpunit/MediaWikiTestCase.php:116
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:60
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:46

3) Wikibase\Test\WikipageEntityLookupTest::testGetEntity with data set #2 (1, 'foo')
DBQueryError: 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: SELECT  page.*, revision.*, text.*  FROM `unittest_wb_entity_per_page` INNER JOIN `unittest_page` ON ((epp_page_id=page_id)) INNER JOIN `unittest_revision` ON ((page_latest=rev_id)) INNER JOIN `unittest_text` ON ((old_id=rev_text_id))  WHERE epp_entity_id = '1' AND epp_entity_type = 'item'  
Function: Wikibase\WikiPageEntityLookup::getEntity
Error: 1051 Unknown table 'page' (localhost)


/home/j/www/phase3/includes/db/Database.php:1016
/home/j/www/phase3/includes/db/Database.php:982
/home/j/www/phase3/includes/db/Database.php:1407
/home/j/www/phase3/extensions/Wikibase/lib/includes/store/WikiPageEntityLookup.php:185
/home/j/www/phase3/extensions/Wikibase/lib/tests/phpunit/store/WikiPageEntityLookupTest.php:146
/home/j/www/phase3/tests/phpunit/MediaWikiTestCase.php:116
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:60
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:46
Comment 1 Jeroen De Dauw 2013-01-11 16:29:37 UTC
Still occurring. Apparently only happens when I run the tests with --exclude-group BreakingTheSlownessBarrier
Comment 2 Daniel Kinzler 2013-01-16 10:57:46 UTC
As far as I understand, the foreign database mechanism as implemented by the LoadBalancer interface does not support per-wiki table prefix settings for access to foreign wikis. At least, I did not see any mention of this, or any way to configure this, when digging through the code.

If i'm right about this, this is a fundamental limitation in the core.
Comment 3 Jeroen De Dauw 2013-01-20 19:30:07 UTC
Limitations in core should not cause errors in our unit tests.
Comment 4 Jeroen De Dauw 2013-01-20 19:31:31 UTC
On SQLite with no table prefix. Probably blocks tests running on Jenkins.

phpunit.php --group Wikibase --exclude-group BreakingTheSlownessBarrier

1) Wikibase\Test\WikipageEntityLookupTest::testGetEntity with data set #0 (0, 'foo')
DBQueryError: 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: SELECT  page.*, revision.*, text.*  FROM unittest_wb_entity_per_page INNER JOIN unittest_page ON ((epp_page_id=page_id)) INNER JOIN unittest_revision ON ((page_latest=rev_id)) INNER JOIN unittest_text ON ((old_id=rev_text_id))  WHERE epp_entity_id = '1' AND epp_entity_type = 'item'  
Function: Wikibase\WikiPageEntityLookup::getEntity
Error: 1 no such table: text


/home/j/www/phase3/includes/db/Database.php:1016
/home/j/www/phase3/includes/db/Database.php:982
/home/j/www/phase3/includes/db/Database.php:1407
/home/j/www/phase3/extensions/Wikibase/lib/includes/store/WikiPageEntityLookup.php:185
/home/j/www/phase3/extensions/Wikibase/lib/tests/phpunit/store/WikiPageEntityLookupTest.php:146
/home/j/www/phase3/tests/phpunit/MediaWikiTestCase.php:116
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:61
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:47

2) Wikibase\Test\WikipageEntityLookupTest::testGetEntity with data set #1 (1, 'foo')
DBQueryError: 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: SELECT  page.*, revision.*, text.*  FROM unittest_wb_entity_per_page INNER JOIN unittest_page ON ((epp_page_id=page_id)) INNER JOIN unittest_revision ON ((page_latest=rev_id)) INNER JOIN unittest_text ON ((old_id=rev_text_id))  WHERE epp_entity_id = '1' AND epp_entity_type = 'item'  
Function: Wikibase\WikiPageEntityLookup::getEntity
Error: 1 no such table: text


/home/j/www/phase3/includes/db/Database.php:1016
/home/j/www/phase3/includes/db/Database.php:982
/home/j/www/phase3/includes/db/Database.php:1407
/home/j/www/phase3/extensions/Wikibase/lib/includes/store/WikiPageEntityLookup.php:185
/home/j/www/phase3/extensions/Wikibase/lib/tests/phpunit/store/WikiPageEntityLookupTest.php:146
/home/j/www/phase3/tests/phpunit/MediaWikiTestCase.php:116
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:61
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:47

3) Wikibase\Test\WikipageEntityLookupTest::testGetEntity with data set #2 (1, 'foo')
DBQueryError: 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: SELECT  page.*, revision.*, text.*  FROM unittest_wb_entity_per_page INNER JOIN unittest_page ON ((epp_page_id=page_id)) INNER JOIN unittest_revision ON ((page_latest=rev_id)) INNER JOIN unittest_text ON ((old_id=rev_text_id))  WHERE epp_entity_id = '1' AND epp_entity_type = 'item'  
Function: Wikibase\WikiPageEntityLookup::getEntity
Error: 1 no such table: text


/home/j/www/phase3/includes/db/Database.php:1016
/home/j/www/phase3/includes/db/Database.php:982
/home/j/www/phase3/includes/db/Database.php:1407
/home/j/www/phase3/extensions/Wikibase/lib/includes/store/WikiPageEntityLookup.php:185
/home/j/www/phase3/extensions/Wikibase/lib/tests/phpunit/store/WikiPageEntityLookupTest.php:146
/home/j/www/phase3/tests/phpunit/MediaWikiTestCase.php:116
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:61
/home/j/www/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:47
Comment 5 Jeroen De Dauw 2013-02-13 10:15:47 UTC
When viewing a diff between two revisions of an item, after https://gerrit.wikimedia.org/r/#/c/47852/8:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

    SELECT page.*, revision.*, text.* FROM `mw_wb_entity_per_page` INNER JOIN `mw_page` ON ((epp_page_id=page_id)) INNER JOIN `mw_revision` ON ((page_latest=rev_id)) INNER JOIN `mw_text` ON ((old_id=rev_text_id)) WHERE epp_entity_id = '14' AND epp_entity_type = 'property' 

from within function "Wikibase\WikiPageEntityLookup::getEntity". Database returned error "1051: Unknown table 'page' (localhost)".
Comment 6 jeblad 2013-03-03 21:54:26 UTC
Is it necessary to get this working, or can we say that it is simply a prerequisite to use two different tables?
Comment 7 Jeroen De Dauw 2013-03-04 20:27:57 UTC
"use two different tables"?!

Some observations:

* MW supports table prefixes. At no point did we decide to not support them.
* Supporting table prefixes should not be hard. If it is, this is due to some bad code we are using.
Comment 8 jeblad 2013-03-04 23:46:33 UTC
tables should be databases
Comment 9 Jeroen De Dauw 2013-03-12 12:43:34 UTC
https://gerrit.wikimedia.org/r/#/c/53351/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links