Page MenuHomePhabricator

[Timebox 4hrs] Investigation: How to E2E-test Special:WhatLinksHere
Closed, ResolvedPublic


Special:WhatLinksHere uses self-join in SpecialWhatLinksHere::showIndirectLinks on temporary tables in tests and breaks with error 1137.

(Possibly incomplete) options:

  • get rid of the self-join in SpecialWhatLinksHere.php
  • get rid of temporary tables for all tests
  • have a job running a set of tests without temporary tables (or using a dbms supporting it)

Hint: You can run the phpunit test runner with the --use-normal-tables flag


  • find and document possible solutions and document possible trade-offs
  • if no solution can be found, escalate


16:21:52 1) Wikibase\Lexeme\Tests\MediaWiki\Specials\LexemeSpecialWhatLinksHereTest::testLexemeLanguageItemLink
16:21:52 Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
16:21:52 Query: SELECT  page_id,page_namespace,page_title,rd_from,page_is_redirect  FROM (SELECT  /*! STRAIGHT_JOIN */ pl_from,rd_from  FROM `unittest_pagelinks` LEFT JOIN `unittest_redirect` ON ((rd_from = pl_from) AND rd_title = 'Q123' AND (rd_interwiki = '' OR rd_interwiki IS NULL) AND rd_namespace = '120') INNER JOIN `unittest_page` ON ((pl_from = page_id))   WHERE pl_namespace = '120' AND pl_title = 'Q123'  ORDER BY pl_from LIMIT 102  ) `temp_backlink_range` INNER JOIN `unittest_page` ON ((pl_from = page_id))    ORDER BY page_id LIMIT 51  
16:21:52 Function: SpecialWhatLinksHere::showIndirectLinks
16:21:52 Error: 1137 Can't reopen table: 'unittest_page' (

Event Timeline

Tarrow renamed this task from Investigation: How to E2E-test Special:WhatLinksHere to [Timebox 4hrs] Investigation: How to E2E-test Special:WhatLinksHere.Jul 13 2018, 9:38 AM
Pablo-WMDE updated the task description. (Show Details)Jul 16 2018, 10:25 AM

Change 446312 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/WikibaseLexeme@master] Use non-temporary tables for testing Special:WhatLinksHere

Change 446312 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Use non-temporary tables for testing Special:WhatLinksHere

Jakob_WMDE closed this task as Resolved.Jul 18 2018, 12:36 PM