explicit limits for subqueries, MySQL doesn't seem to be able to work this out
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 2 Jan 2006 00:04:28 +0000 (00:04 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 2 Jan 2006 00:04:28 +0000 (00:04 +0000)
includes/SpecialWhatlinkshere.php

index 1ca9698..4738ab8 100644 (file)
@@ -113,9 +113,9 @@ class WhatLinksHerePage {
                // with an is_template field in the output indicating which one the link
                // came from
                $sql = "(SELECT page_id,page_namespace, page_title, page_is_redirect, 1 as is_template " .
-                 "FROM page, templatelinks WHERE $tlCond $offsetCond) " .
+                 "FROM page, templatelinks WHERE $tlCond $offsetCond $options) " .
                  "UNION (SELECT page_id,page_namespace, page_title, page_is_redirect, 0 as is_template " .
-                 "FROM page, pagelinks WHERE $plCond $offsetCond) $options";
+                 "FROM page, pagelinks WHERE $plCond $offsetCond $options) $options";
                $res = $dbr->query( $sql, $fname );
                $numRows = $dbr->numRows( $res );