Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10084

Deletion of trigger-related network map elements needs to be sorted out

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.2.11, 2.4.7, 3.0.0alpha4
    • Fix Version/s: 2.2.12rc1, 2.4.8rc1, 3.0.0alpha5
    • Component/s: Server (S)
    • Labels:
      None

      Description

      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);
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              glebs.ivanovskis Glebs Ivanovskis (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: