From: Tim Starling Date: Mon, 2 Jan 2006 00:04:28 +0000 (+0000) Subject: explicit limits for subqueries, MySQL doesn't seem to be able to work this out X-Git-Tag: 1.6.0~813 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=3cd4abc85e3b0537860f5f82f05027488b37b3bf;p=lhc%2Fweb%2Fwiklou.git explicit limits for subqueries, MySQL doesn't seem to be able to work this out --- diff --git a/includes/SpecialWhatlinkshere.php b/includes/SpecialWhatlinkshere.php index 1ca9698332..4738ab857d 100644 --- a/includes/SpecialWhatlinkshere.php +++ b/includes/SpecialWhatlinkshere.php @@ -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 );