-
Incident report
-
Resolution: Fixed
-
Trivial
-
2.2.11, 2.4.7, 3.0.0alpha4
-
None
Seems like in src/libs/zbxdbhigh/host.c in function DBdelete_triggers() piece of code
DBget_sysmapelements_by_element_type_ids(&selementids, SYSMAP_ELEMENT_TYPE_TRIGGER, triggerids); if (0 != selementids.values_num) { zbx_strcpy_alloc(&sql, &sql_alloc, &sql_offset, "delete from sysmaps_elements where"); DBadd_condition_alloc(&sql, &sql_alloc, &sql_offset, "selementid", selementids.values, selementids.values_num); zbx_strcpy_alloc(&sql, &sql_alloc, &sql_offset, ";\n"); }
has no affect on execution since it's followed by
sql_offset = 0;
and composing another SQL statement.
Lines
sql_offset = 0; DBbegin_multiple_update(&sql, &sql_alloc, &sql_offset);
should probably be moved on top of
DBget_sysmapelements_by_element_type_ids(&selementids, SYSMAP_ELEMENT_TYPE_TRIGGER, triggerids);