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

Remove unnecessary queries in map permissions check

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 1.8.4
    • None
    • Frontend (F)
    • None

      when map permissions are checked sometimes useless queries may be executed, like

      SELECT DISTINCT t.triggerid FROM triggers t,functions f,items i,hosts_groups hg,rights r,users_groups ug WHERE ((t.triggerid BETWEEN 000000000000000 AND 099999999999999)) AND f.triggerid=t.triggerid AND f.itemid=i.itemid AND hg.hostid=i.hostid AND r.id=hg.groupid AND r.groupid=ug.usrgrpid AND ug.userid=4 AND r.permission>=3 AND NOT EXISTS( SELECT ff.triggerid FROM functions ff, items ii WHERE ff.triggerid=t.triggerid AND ff.itemid=ii.itemid AND EXISTS( SELECT hgg.groupid FROM hosts_groups hgg, rights rr, users_groups gg WHERE hgg.hostid=ii.hostid AND rr.id=hgg.groupid AND rr.groupid=gg.usrgrpid AND gg.userid=4 AND rr.permission<3)) AND (t.triggerid IN (-1))

            Unassigned Unassigned
            vedmak Alexey Fukalov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: