[ZBX-5316] Hosts and screens items with similar ids are deleted without specified resourcetype Created: 2012 Jul 12  Updated: 2017 May 30  Resolved: 2012 Jul 13

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.8.15rc1
Fix Version/s: 1.8.15rc1

Type: Incident report Priority: Major
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: screens
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

We have a mistake in the source code:
include/hosts.inc.php:
// delete screen items
DBexecute('DELETE FROM screens_items WHERE '.DBcondition('resourceid',$hostids)).' AND resourcetype='.SCREEN_RESOURCE_HOST_TRIGGERS;

It calls this query:
Time:0.000515 SQL: DELETE FROM screens_items WHERE (resourceid IN (89))

The last round bracket should be after SCREEN_RESOURCE_HOST_TRIGGERS!



 Comments   
Comment by Alexey Fukalov [ 2012 Jul 13 ]

dev branch: svn://svn.zabbix.com/branches/dev/ZBX-5316

Comment by Pavels Jelisejevs (Inactive) [ 2012 Jul 13 ]

TESTED.

Comment by Alexey Fukalov [ 2012 Jul 13 ]

Fixed in pre-1.8.15rc1 r28862

Generated at Wed Apr 24 00:51:41 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.