Closed Bug 267905 Opened 21 years ago Closed 21 years ago

sql error while getting "CSV" data from a chart

Categories

(Bugzilla :: Reporting/Charting, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: aleksei.a.skorokhodov, Assigned: gerv)

Details

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) Build Identifier: This is Bugzilla Bugzilla Version 2.18rc3 Internal Error Bugzilla has suffered an internal error. Please save this page and send it to aleksei.a.skorokhodov@intel.com with details of what you were doing at the time this message appeared. URL: http:// [ cut ] /bugzilla/chart.cgi?category=-All-&cumulate=1&label0=All% 20Open&line0=64&name=64&select0=1&subcategory=-All-&ctype=csv&action=plot undef error - DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')), series_value FROM series_data WHERE series_id = '64' AND ser [for Statement "SELECT TO_DAYS(series_date) - TO_DAYS (FROM_UNIXTIME()), series_value FROM series_data WHERE series_id = ? AND series_date >= FROM_UNIXTIME()"] at Bugzilla/Chart.pm line 254 Bugzilla::Chart::readData('Bugzilla::Chart=HASH(0x1c8ed10)') called at Bugzilla/Chart.pm line 195 Bugzilla::Chart::data('Bugzilla::Chart=HASH (0x1c8ed10)') called at data\template\template\en\default\reports\chart.csv.tmpl line 20 eval {...} called at data\template\template\en\default\reports\chart.csv.tmpl line 20 eval {...} called at data\template\template\en\default\reports\chart.csv.tmpl line 16 Template::Provider::__ANON__('Template::Context=HASH(0x1b6b7b0)') called at C:/Perl/site/lib/Template/Document.pm line 140 eval {...} called at C:/Perl/site/lib/Template/Document.pm line 138 Template::Document::process ('Template::Document=HASH(0x1ca2c6c)', 'Template::Context=HASH(0x1b6b7b0)') called at C:/Perl/site/lib/Template/Context.pm line 350 eval {...} called at C:/Perl/site/lib/Template/Context.pm line 320 Template::Context::process ('Template::Context=HASH(0x1b6b7b0)', 'Template::Document=HASH(0x1ca2c6c)') called at C:/Perl/site/lib/Template/Service.pm line 97 eval {...} called at C:/Perl/site/lib/Template/Service.pm line 94 Template::Service::process ('Template::Service=HASH(0x1afada8)', 'reports/chart.csv.tmpl', 'HASH (0x1a4c3a8)') called at C:/Perl/site/lib/Template.pm line 76 Template::process ('Bugzilla::Template=HASH(0x1a4c498)', 'reports/chart.csv.tmpl', 'HASH (0x1a4c3a8)') called at C:/Program Files/Apache Group/Apache2/htdocs/bugzilla/chart.cgi line 274 main::plot() called at C:/Program Files/Apache Group/Apache2/htdocs/bugzilla/chart.cgi line 117 Actions:Home | New | Search | bug # | Reports | My Requests | My Votes | Sanity check | Log out aleksei.a.skorokhodov@intel.com Edit:Prefs | Parameters | Users | Products | Flags | Groups | Keywords Saved Searches: My Bugs Reproducible: Always Steps to Reproduce: 1. open "reports" page 2. click "new charts" 3. click "Add to list" without filling any fields 4. on the new page click "Chart this list" - btw, the image is NOT displayed. error.log file from apache\logs contains: chart.cgi: Use of uninitialized value in concatenation (.) or string at Bugzilla/Chart.pm line 232., referer: http://[cut]/bugzilla/chart.cgi? category=-All-&subcategory=-All- &name=64&label0=All+Open&line0=64&datefrom=&dateto=&action-wrap=Chart+This+List chart.cgi: Use of uninitialized value in concatenation (.) or string at Bugzilla/Chart.pm line 232., referer: http://[cut]/bugzilla/chart.cgi? category=-All-&subcategory=-All- &name=64&label0=All+Open&line0=64&datefrom=&dateto=&action-wrap=Chart+This+List 5. click "CSV" link so, actually there are TWO bugs here, I suppose. first - the image is not displayed. second - SQL exception while trying to get "CSV" data Actual Results: this page is displayed: ----------------------------- This is Bugzilla Bugzilla Version 2.18rc3 Internal Error Bugzilla has suffered an internal error. Please save this page and send it to aleksei.a.skorokhodov@intel.com with details of what you were doing at the time this message appeared. URL: http:// [ cut ] /bugzilla/chart.cgi?category=-All-&cumulate=1&label0=All% 20Open&line0=64&name=64&select0=1&subcategory=-All-&ctype=csv&action=plot undef error - DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')), series_value FROM series_data WHERE series_id = '64' AND ser [for Statement "SELECT TO_DAYS(series_date) - TO_DAYS (FROM_UNIXTIME()), series_value FROM series_data WHERE series_id = ? AND series_date >= FROM_UNIXTIME()"] at Bugzilla/Chart.pm line 254 Bugzilla::Chart::readData('Bugzilla::Chart=HASH(0x1c8ed10)') called at Bugzilla/Chart.pm line 195 Bugzilla::Chart::data('Bugzilla::Chart=HASH (0x1c8ed10)') called at data\template\template\en\default\reports\chart.csv.tmpl line 20 eval {...} called at data\template\template\en\default\reports\chart.csv.tmpl line 20 eval {...} called at data\template\template\en\default\reports\chart.csv.tmpl line 16 Template::Provider::__ANON__('Template::Context=HASH(0x1b6b7b0)') called at C:/Perl/site/lib/Template/Document.pm line 140 eval {...} called at C:/Perl/site/lib/Template/Document.pm line 138 Template::Document::process ('Template::Document=HASH(0x1ca2c6c)', 'Template::Context=HASH(0x1b6b7b0)') called at C:/Perl/site/lib/Template/Context.pm line 350 eval {...} called at C:/Perl/site/lib/Template/Context.pm line 320 Template::Context::process ('Template::Context=HASH(0x1b6b7b0)', 'Template::Document=HASH(0x1ca2c6c)') called at C:/Perl/site/lib/Template/Service.pm line 97 eval {...} called at C:/Perl/site/lib/Template/Service.pm line 94 Template::Service::process ('Template::Service=HASH(0x1afada8)', 'reports/chart.csv.tmpl', 'HASH (0x1a4c3a8)') called at C:/Perl/site/lib/Template.pm line 76 Template::process ('Bugzilla::Template=HASH(0x1a4c498)', 'reports/chart.csv.tmpl', 'HASH (0x1a4c3a8)') called at C:/Program Files/Apache Group/Apache2/htdocs/bugzilla/chart.cgi line 274 main::plot() called at C:/Program Files/Apache Group/Apache2/htdocs/bugzilla/chart.cgi line 117 Actions:Home | New | Search | bug # | Reports | My Requests | My Votes | Sanity check | Log out aleksei.a.skorokhodov@intel.com Edit:Prefs | Parameters | Users | Products | Flags | Groups | Keywords Saved Searches: My Bugs
Flags: blocking2.20?
Flags: blocking2.18?
Hmmm, on landfill I can reproduce this on the cvs-tip (2.19.1+) although it gets a different error message. It seems to work fine on the 2.18 branch though. But I can't find anything checked in since rc3 that would have affected this, and the reporter says he did it on rc3... The error message on cvs tip is: undef error - WHILE loop terminated (> 1000 iterations)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking2.20? → blocking2.20+
I won't hold for this, but I'll certainly take the fix on the 2.18 branch if we can solve it. Anyone else manage to reproduce this? It's a chart thing.. Gerv?
Flags: blocking2.18? → blocking2.18-
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.18
With the exact URL given on my local installations, I'm seeing a different error on both 2.18 and 2.19: undef error - DBD::mysql::db selectrow_array failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 [for Statement "SELECT MIN(series_date) FROM series_data WHERE series_id IN ()"] at Bugzilla/Chart.pm line 213 But this is a known issue (according to the source code comments) - if you don't have any valid rows, things go wrong. So I'm interested in the reproduction scenario. Aleksei: you said "3. click "Add to list" without filling any fields". What exactly did you mean by "without filling any fields"? There should be a series selected by default. Was there? Do you have JavaScript turned on? (It's not required for the feature to work, but I need to know for debugging purposes.) Gerv
Aleksei: I've reproduced an error like yours - it happened on an installation where collectstats.pl had never been run. Have you been running collectstats.pl every night? Gerv
no, I have not executed this perl script. I thought bugzilla will write a warning message on a web-page if I need to run something...
OK, so that could be improved. But the documentation clearly states you need to regularly run collectstats.pl if you want charts. Time to review it again? :-) http://www.bugzilla.org/docs/2.18/html/extraconfig.html Gerv
well, you know - nobody reads docs until a problem arises. :) anyway, if a user has not performed some actions and this lead to an error, the error/warning message must be clear and obvious. thanks!
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
for the record, fixing the error message to be more clear is now bug 275705
clearing target of DUPLICATE/WONTFIX/INVALID/WORKSFORME so they'll show up as untriaged if they get reopened.
Target Milestone: Bugzilla 2.18 → ---
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.