From: lpsolit%gmail.com <> Date: Tue, 28 Oct 2008 03:53:45 +0000 (+0000) Subject: Bug 461756: [Oracle] collectstats.pl --regenerate uses PL/SQL reserved word in query... X-Git-Tag: bugzilla-3.2rc2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5521eb9d35550abf454d48eb33d9a07555a4eea9;p=thirdparty%2Fbugzilla.git Bug 461756: [Oracle] collectstats.pl --regenerate uses PL/SQL reserved word in query - Patch by Dave Taylor r=LpSolit r=mkanat a=mkanat --- diff --git a/collectstats.pl b/collectstats.pl index 5c65f2c6ac..6afa25978c 100755 --- a/collectstats.pl +++ b/collectstats.pl @@ -402,13 +402,13 @@ sub regenerate_stats { # database was created, and the end date from the current day. # If there were no bugs in the search, return early. my $query = q{SELECT } . - $dbh->sql_to_days('creation_ts') . q{ AS start, } . - $dbh->sql_to_days('current_date') . q{ AS end, } . + $dbh->sql_to_days('creation_ts') . q{ AS start_day, } . + $dbh->sql_to_days('current_date') . q{ AS end_day, } . $dbh->sql_to_days("'1970-01-01'") . qq{ FROM bugs $from_product WHERE } . $dbh->sql_to_days('creation_ts') . qq{ IS NOT NULL $and_product - ORDER BY start } . $dbh->sql_limit(1); + ORDER BY start_day } . $dbh->sql_limit(1); my ($start, $end, $base) = $dbh->selectrow_array($query, undef, @values); if (!defined $start) {