r50483 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50482‎ | r50483 | r50484 >
Date:14:05, 11 May 2009
Author:simetrical
Status:ok
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialRecentchangeslinked.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php
@@ -155,9 +155,7 @@
156156 $sql = $subsql[0];
157157 else {
158158 // need to resort and relimit after union
159 - // unwrapped UNION block will not work in Oracle. Wrapper aded.
160 - $sql = "SELECT * FROM ((" . implode( ") UNION (", $subsql ) . ")) ORDER BY rc_timestamp DESC";
161 - $sql = $dbr->limitResult($sql, $limit, false);
 159+ $sql = "(" . implode( ") UNION (", $subsql ) . ") ORDER BY rc_timestamp DESC LIMIT {$limit}";
162160 }
163161
164162 $res = $dbr->query( $sql, __METHOD__ );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r50478Preparations for Oracle database abstraction update....freakolowsky12:38, 11 May 2009

Status & tagging log