MW 1.32.0 long query issue with ordermethod = firstedit or lastedit
Created by: nixwiz
Testing the upgrade from MW 1.30.0 with DPL 3.1.1 to MW 1.32.0 with DPL 3.3.2 and running into an issue with one wiki that uses "ordermethod = firstedit" on a page. Doing so generates a query that takes almost 30 minutes to complete. The query is:
SELECT /* Wikimedia\Rdbms\Database::query */ DISTINCT rev.rev_timestamp,`page`.page_namespace AS `page_namespace`,`page`.page_id AS `page_id`,`page`.page_title AS `page_title` FROM `revision` `rev`,`page` WHERE ((`page`.page_title like'Notes\\_de\\_version/2%')) AND `page`.page_is_redirect = '0' AND `page`.page_namespace = '0' ORDER BY rev.rev_timestamp DESC LIMIT 1
The relevant portion of the page source is:
:* [[Notes de version]] - {{ #dpl:
| namespace =
| titlematch = Notes de version/2%
| ordermethod = firstedit
| order = descending
| replaceintitle = /Notes de version\//,
| format = ,[[%PAGE%|²{ucfirst:²{ #time: l j F Y | %TITLE% }²}²]],
| count = 1
}}
Setting ordermethod to lastedit creates the same SQL and causes the same page load failure (our proxy times out).
Setting ordermethod to title does not cause the issue.
This is not an issue with current iteration of this wiki (MW 1.30.0 with DPL 3.2.1).