[ZBX-5862] DELETE query from housekeeper table is too long on Oracle database Created: 2012 Nov 16  Updated: 2017 May 30  Resolved: 2013 Jan 03

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.0.4rc1, 2.1.0
Fix Version/s: 2.0.5rc1, 2.1.0

Type: Incident report Priority: Critical
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: housekeeper, oracle
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Oracle


Attachments: Text File oracle_error.log     File zbx-5862-patch.bz2    
Issue Links:
Duplicate
is duplicated by ZBX-5949 SELECT query is too long on Oracle da... Closed
is duplicated by ZBX-4190 Need to break apart the compounding o... Closed

 Description   

46133:20121116:172221.922 [Z3005] query failed: [-1] ORA-00913: too many values [delete from housekeeper where (housekeeperid in (1001000000223308,1001000000223309,1001000000223310,...1001000000330563,1001000000330565,1001000000330566,1001000000330567,1001000000330568))]

Query length is 1729345 characters.



 Comments   
Comment by Andris Mednis [ 2012 Nov 30 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5862

Comment by richlv [ 2012 Nov 30 ]

does the change that was mentioned in commit message in rev 31795 affect all databases ?

Comment by Andris Mednis [ 2012 Nov 30 ]

Yes, the change is not particular to Oracle. It should be carefully tested on different databases as the changed DBadd_condition_alloc() function is used in many places and impact on performance is not yet known.

Comment by Alexey Pustovalov [ 2012 Dec 06 ]

(7) Frontend should use similar algorithm also.

Eduards RESOLVED

sasha CLOSED

Comment by Alexander Vladishev [ 2012 Dec 07 ]

Server side is successfully tested. Please review my changes in r31960.
andris Reviewed r31960.

Comment by Eduards Samersovs (Inactive) [ 2012 Dec 13 ]

Frontend fixed in same development branch svn://svn.zabbix.com/branches/dev/ZBX-5862

Comment by Alexey Fukalov [ 2012 Dec 14 ]

(8)
I added tests for dbConditionInt function, one is not passed.

Eduards RESOLVED, please retest with phpunit

sasha CLOSED

Comment by Alexey Fukalov [ 2012 Dec 14 ]

(9)
Seems dbConditionInt can be used in more places in Caction.php, CDrule.php and maybe more, where ids are used.

Eduards Varchar fields will use old DbCondition function.

Vedmak CLOSED

Comment by Alexey Fukalov [ 2012 Dec 14 ]

(10)
In CItem.php:973 function has 4 params, but it supports only 3.

Eduards RESOLVED

Vedmak CLOSED

Comment by Alexey Fukalov [ 2012 Dec 14 ]

(11)
In class.frontendsetup.php:454 seems wrong line inserted.

Eduards RESOLVED

Vedmak CLOSED

Comment by Alexey Pustovalov [ 2012 Dec 16 ]

(12)
dbConditionInt and dbCondition should return field = value (field != value) and with quotes for string values for one value.

Eduards RESOLVED

Vedmak CLOSED

Comment by Alexey Fukalov [ 2012 Dec 17 ]

(13)
I added more tests, some fail.

Eduards Very good! 2 fail tests fixed

Vedmak CLOSED

Comment by Alexey Fukalov [ 2012 Dec 18 ]

(14)
There are some places with no space before Dbcondition calls, it results in incorrect sql

' WHERE'.dbConditionInt('hostid', $allids).

Eduards RESOLVED r.32185

Vedmak CLOSED

Comment by Eduards Samersovs (Inactive) [ 2012 Dec 18 ]

Fixed in versions pre-2.0.5rc1 r32192

Comment by Eduards Samersovs (Inactive) [ 2012 Dec 18 ]

Fixed in versions Fixed in versions pre-2.1.0 (beta) r32218, pre-2.0.5rc1 r32192

Comment by Eduards Samersovs (Inactive) [ 2012 Dec 20 ]

Fixed in re-created development branch svn://svn.zabbix.com/branches/dev/ZBX-5862

Comment by Eduards Samersovs (Inactive) [ 2013 Jan 03 ]

Tested!

Comment by Alexander Vladishev [ 2013 Jan 03 ]

Fixed in versions pre-2.0.5 r32404 and pre-2.1.0 (trunk) r32405.

Generated at Fri Mar 29 10:29:57 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.