Last modified: 2014-07-21 17:06:11 UTC
ActiveUsers page does not work with Postgres (includes/specials/SpecialActiveusers.php): Jul 07 13:15:21 xxx postgres[1234]: ERROR: non-integer constant in ORDER BY at character 361 Jul 07 13:15:21 xxx postgres[1234]: STATEMENT: SELECT rc_user_text,MAX(rc_timestamp) AS lastedittime FROM "recentchanges" WHERE (rc_user > 0) AND (rc_type != '5') AND (rc_log_type IS NULL OR rc_log_type != 'newusers') AND (rc_timestamp >= '2014-06-07 13:15:21 GMT') AND (rc_timestamp <= '2014-07-07 13:15:21 GMT') GROUP BY rc_user_text ORDER BY NULL This bug is introduced by https://git.wikimedia.org/commit/mediawiki%2Fcore.git/87be24dbdf8235e381110393011b86e0f5be395f
Reproduced by simply going to http://localhost/wiki/index.php/Special:ActiveUsers The "ORDER BY NULL" optimization seems to be MySQL peculiarity. includes/specials/SpecialActiveusers.php: 'ORDER BY' => 'NULL' // avoid filesort I can hack includes/db/DatabasePostgres.php selectSQLText to specifically delete that clause, but that is the correct to approach the problem? Doing so doesn't make Special:ActiveUsers work again under PostgreSQL, but it does get further before hitting a different error.
Jeff, is this fixed by https://gerrit.wikimedia.org/r/#/c/144765/ ?
Change 144824 had a related patch set uploaded by Jjanes: PostgreSQL: Fix ORDER BY NULL https://gerrit.wikimedia.org/r/144824
Kevin, Yes, https://gerrit.wikimedia.org/r/#/c/144765/ fixes this bug in 1.24. I put the wrong bug number into the commit message, but since it got merged already I have no idea how to fix it now. The mediawiki.org pages for gerrit don't seem to cover the situation of amending a commit messge that has already been merged.
Fixed by https://gerrit.wikimedia.org/r/#/c/144765/ ; closing as FIXED. Should there be a request to backport to 1.23.x tarballs? If so, feel free to set the backport flag in this ticket.
Gerrit change #144824 is the backport to REL1_23, so I'm setting the appropriate flag
Change 144824 merged by jenkins-bot: PostgreSQL: Fix ORDER BY NULL https://gerrit.wikimedia.org/r/144824