From: Aryeh Gregor Date: Mon, 11 May 2009 14:05:21 +0000 (+0000) Subject: Partial revert of r50478 "Preparations for Oracle database abstraction update." X-Git-Tag: 1.31.0-rc.0~41821 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=57fa8aba4cc2be0fe34e302d3032935d11e6a08a;p=lhc%2Fweb%2Fwiklou.git Partial revert of r50478 "Preparations for Oracle database abstraction update." Syntax error in RecentChangesLinked with MySQL 5.0: "1248: Every derived table must have its own alias (localhost)". Also likely to fail in MySQL 4.0 even with an alias added, since subqueries don't work. --- diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index e1b5ae423d..82aa5b98e3 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -155,9 +155,7 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges { $sql = $subsql[0]; else { // need to resort and relimit after union - // unwrapped UNION block will not work in Oracle. Wrapper aded. - $sql = "SELECT * FROM ((" . implode( ") UNION (", $subsql ) . ")) ORDER BY rc_timestamp DESC"; - $sql = $dbr->limitResult($sql, $limit, false); + $sql = "(" . implode( ") UNION (", $subsql ) . ") ORDER BY rc_timestamp DESC LIMIT {$limit}"; } $res = $dbr->query( $sql, __METHOD__ );