Closed Bug 341492 Opened 20 years ago Closed 20 years ago

./collectstats.pl --regenerate fails

Categories

(Bugzilla :: Reporting/Charting, defect)

2.23
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: emmanuel, Assigned: emmanuel)

Details

(Keywords: regression)

Attachments

(1 file)

Using the current tip, I can't run "collectstats --regenerate" without it failing. I get the following error (sorry for the foreign language) : [manu@lora bugzilla-cvs]$ ./collectstats.pl --regenerate Regenerating -All- [100.0%] - 00:00:00 Regenerating TestProduct [0.0%]<h1>Software error:</h1> <pre>DBD::Pg::db selectcol_arrayref failed: ERREUR: erreur de syntaxe sur ou près de «products» au caractère 286 [for Statement &quot;SELECT bug_id FROM bugs INNER JOIN products ON bugs.product_id = products.id WHERE bugs.creation_ts &lt; TO_TIMESTAMP(2453858::int, 'J')::date AND bugs.creation_ts &gt;= TO_TIMESTAMP(2453857::int, 'J')::dateAND products.name = ? ORDER BY bug_id&quot;] at ./collectstats.pl line 338 main::regenerate_stats('./data/mining', 'TestProduct') called at ./collectstats.pl line 76 </pre> This is caused by the "::dateAND products.name" part of the line. There should be a space between "::date" and "AND".
Assignee: gerv → eseyman
Status: NEW → ASSIGNED
Attachment #225558 - Flags: review?
Comment on attachment 225558 [details] [diff] [review] Include space before AND and "INNER JOIN" >- $and_product = q{AND products.name = ?}; >- $from_product = q{INNER JOIN products >+ $and_product = q{ AND products.name = ?}; >+ $from_product = q{ INNER JOIN products To make things even safer, we should add a whitespace after too (this could be done on checkin, if desired). Anyway, this looks good. r=LpSolit
Attachment #225558 - Flags: review? → review+
Affects 2.24 only.
Flags: approval?
Target Milestone: --- → Bugzilla 2.24
This is a regression due to bug 303690.
Keywords: regression
(In reply to comment #2) > > To make things even safer, we should add a whitespace after too (this could be > done on checkin, if desired). Anyway, this looks good. r=LpSolit FWIW, I'm not a big fan of this. It hurts readability and breaks existing pratices.
Target Milestone: Bugzilla 2.24 → ---
Target Milestone: --- → Bugzilla 2.24
Flags: approval? → approval+
Checking in collectstats.pl; /cvsroot/mozilla/webtools/bugzilla/collectstats.pl,v <-- collectstats.pl new revision: 1.49; previous revision: 1.48 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Summary: Collectstats --regenerate fails → ./collectstats.pl --regenerate fails
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: