From: Simon Green Date: Mon, 2 Dec 2013 22:44:46 +0000 (+1000) Subject: Bug 944583 - sendunsentbugmail.pl has bad SQL X-Git-Tag: bugzilla-4.5.2~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50a44fc4185bb62fdf2a405cb0dfafe782824362;p=thirdparty%2Fbugzilla.git Bug 944583 - sendunsentbugmail.pl has bad SQL r=glob, a=sgreen --- diff --git a/contrib/sendunsentbugmail.pl b/contrib/sendunsentbugmail.pl index 536d12146c..4745541356 100755 --- a/contrib/sendunsentbugmail.pl +++ b/contrib/sendunsentbugmail.pl @@ -17,10 +17,9 @@ use Bugzilla::BugMail; my $dbh = Bugzilla->dbh; my $list = $dbh->selectcol_arrayref( - 'SELECT bug_id FROM bugs - WHERE lastdiffed IS NULL - OR lastdiffed < delta_ts - AND delta_ts < ' + 'SELECT bug_id FROM bugs + WHERE (lastdiffed IS NULL OR lastdiffed < delta_ts) + AND delta_ts < ' . $dbh->sql_date_math('NOW()', '-', 30, 'MINUTE') . ' ORDER BY bug_id');