[ZBX-10232] SQL errors with invalid parameter "year" in report3.php Created: 2016 Jan 05  Updated: 2017 May 30  Resolved: 2016 Jan 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Frontend (F)
Affects Version/s: 2.0.16, 2.2.11, 2.4.7, 3.0.0alpha5
Fix Version/s: 2.0.17rc1, 2.2.12rc1, 2.4.8rc1, 3.0.0beta1

Type: Incident report Priority: Critical
Reporter: Alexander Vladishev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: errors, itservices, sla
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

For example:

report3.php?serviceid=1&year=20161 produces SQL errors:

PostgreSQL:

pg_query(): Query failed: ERROR:  syntax error at or near ")"
LINE 1: ...ROM service_alarms sa WHERE sa.serviceid='1' AND () ORDER BY...
                                                                 ^ [include/db.inc.php:440]
Error in query [SELECT * FROM service_alarms sa WHERE sa.serviceid='1' AND () ORDER BY sa.clock,sa.servicealarmid] [ERROR:  syntax error at or near ")"
LINE 1: ...ROM service_alarms sa WHERE sa.serviceid='1' AND () ORDER BY...
                                                                 ^]

MySQL:

Error in query [SELECT * FROM service_alarms sa WHERE sa.serviceid='1' AND () ORDER BY sa.clock,sa.servicealarmid] [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ORDER BY sa.clock,sa.servicealarmid' at line 1]

3.0.0alpha5 has a different link: zabbix.php?action=report.services&serviceid=1&year=20161



 Comments   
Comment by Gunars Pujats (Inactive) [ 2016 Jan 18 ]

(1) No translation strings changed.

sasha CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Jan 18 ]

RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBX-10232

Comment by Alexander Vladishev [ 2016 Jan 19 ]

(2) PHP error with an invalid "year" parameter

report3.php?serviceid=1&year=2016a

A non well formed numeric value encountered [report3.php:151]

sasha RESOLVED in r57794

gunarspujats CLOSED

Comment by Alexander Vladishev [ 2016 Jan 19 ]

Successfully tested!

Comment by Gunars Pujats (Inactive) [ 2016 Jan 19 ]

Fixed in:

  • pre-2.0.17rc1 r57801
  • pre-2.2.12rc1 r57805
  • pre-2.4.8rc1 r57806
  • pre-3.0.0beta1 (trunk) r57809
Comment by Gunars Pujats (Inactive) [ 2016 Jan 19 ]

(3) API documentation:

sasha Thanks! CLOSED

Generated at Fri Apr 19 19:25:30 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.