summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-19 01:14:26 +0100
committermkanat%kerio.com <>2005-02-19 01:14:26 +0100
commitb9402d3e113b408143c7ad18f1cb798023c7d178 (patch)
treeead35cce72a5f7be7fa8660561159eca2174185d /checksetup.pl
parent62eecf24480520e204ab0057f8f7845c13f37c13 (diff)
downloadbugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.tar.gz
bugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.tar.xz
Bug 280497: Replace "LIMIT" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat,a=justdave
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl8
1 files changed, 5 insertions, 3 deletions
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;