[ZBX-4157] There is incorrect limit in the Zabbix src code for the length of the SQL statement Created: 2011 Sep 21  Updated: 2017 May 30  Resolved: 2011 Sep 22

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 1.8.7
Fix Version/s: 1.8.8, 1.9.7 (beta)

Type: Incident report Priority: Blocker
Reporter: Igor Danoshaites (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: crash
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

There is incorrect limit in the Zabbix src code (2KB, it is set as value of the constant) for the length of the sql statement, that is why in the SQL statement "select t.hosttemplateid,t.hostid,t.templateid from hosts_templates" value of the "hostid" can be truncated in some cases.

Please notice truncated "hostid" value in the end of the following sql statement: "1001" instead of "1001000000010683".

Trace from the log file:

23099:20110920:130612.381 [Z3005] query failed: [1064] 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 [select t.hosttemplateid,t.hostid,t.templateid from hosts_templates t where t.hostid in (1001000000010002,1001000000010003,1001000000010023,1001000000010044,1001000000010129,1001000000010130,1001000000010305,1001000000010307,1001000000010383,1001000000010384,1001000000010385,1001000000010386,1001000000010387,1001000000010388,1001000000010389,1001000000010391,1001000000010392,1001000000010393,1001000000010394,1001000000010395,1001000000010396,1001000000010397,1001000000010399,1001000000010425,1001000000010426,1001000000010428,1001000000010429,1001000000010430,1001000000010431,1001000000010432,1001000000010433,1001000000010434,1001000000010435,1001000000010436,1001000000010437,1001000000010438,1001000000010439,1001000000010440,1001000000010441,1001000000010442,1001000000010443,1001000000010444,1001000000010445,1001000000010446,1001000000010447,1001000000010448,1001000000010449,1001000000010450,1001000000010451,1001000000010452,1001000000010453,1001000000010454,1001000000010455,1001000000010456,1001000000010457,1001000000010458,1001000000010459,1001000000010472,1001000000010476,1001000000010477,1001000000010494,1001000000010495,1001000000010496,1001000000010499,1001000000010501,1001000000010502,1001000000010504,1001000000010505,1001000000010506,1001000000010508,1001000000010510,1001000000010511,1001000000010517,1001000000010518,1001000000010519,1001000000010520,1001000000010521,1001000000010522,1001000000010523,1001000000010524,1001000000010525,1001000000010526,1001000000010584,1001000000010585,1001000000010586,1001000000010587,1001000000010594,1001000000010595,1001000000010597,1001000000010599,1001000000010600,1001000000010601,1001000000010602,1001000000010613,1001000000010632,1001000000010637,1001000000010640,1001000000010641,1001000000010644,1001000000010645,1001000000010646,1001000000010652,1001000000010658,1001000000010659,1001000000010660,1001000000010662,1001000000010664,1001000000010665,1001000000010670,1001000000010673,1001000000010676,1001000000010677,1001000000010680,1001000000010681,1001000000010682,1001]

We should increase this limit!



 Comments   
Comment by Alexander Vladishev [ 2011 Sep 22 ]

Fixed in version pre1.8.8, r21838.

Generated at Sat Apr 20 01:09:56 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.