From b9402d3e113b408143c7ad18f1cb798023c7d178 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Sat, 19 Feb 2005 00:14:26 +0000 Subject: Bug 280497: Replace "LIMIT" with Bugzilla::DB function call Patch By Tomas Kopal r=mkanat,a=justdave --- checksetup.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'checksetup.pl') diff --git a/checksetup.pl b/checksetup.pl index 388703ab1..350c71243 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -3552,7 +3552,9 @@ if (($fielddef = GetFieldDef("attachments", "creation_ts")) && # Restrict this as much as possible in order to avoid false positives, and # keep the db search time down - my $sth2 = $dbh->prepare("SELECT bug_when FROM longdescs WHERE bug_id=? AND who=? AND thetext LIKE ? ORDER BY bug_when LIMIT 1"); + my $sth2 = $dbh->prepare("SELECT bug_when FROM longdescs + WHERE bug_id=? AND who=? AND thetext LIKE ? + ORDER BY bug_when " . $dbh->sql_limit(1)); while (my ($bug_id, $attach_id, $submitter_id) = $sth->fetchrow_array()) { $sth2->execute($bug_id, $submitter_id, "Created an attachment (id=$attach_id)%"); my ($when) = $sth2->fetchrow_array(); @@ -4037,8 +4039,8 @@ if (TableExists("user_series_map")) { # 2003-06-26 Copy the old charting data into the database, and create the # queries that will keep it all running. When the old charting system goes # away, if this code ever runs, it'll just find no files and do nothing. -my $series_exists = $dbh->selectrow_array("SELECT 1 FROM series LIMIT 1"); - +my $series_exists = $dbh->selectrow_array("SELECT 1 FROM series " . + $dbh->sql_limit(1)); if (!$series_exists) { print "Migrating old chart data into database ...\n" unless $silent; -- cgit v1.2.3-24-g4f1b