Not remove linked data with triggers

XMLWordPrintable

    • Type: Incident report
    • Resolution: Cannot Reproduce
    • Priority: Blocker
    • 1.9.7 (beta), 2.0.0
    • Affects Version/s: 1.9.0 (alpha)
    • Component/s: Frontend (F)

      ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-02292: integrity constraint (ZABBIX_TEST.ALERTS_FK3) violated - child record found[/var/www/zabbix/include/db.inc.php:507]
      SQL error [ORA-02292: integrity constraint (ZABBIX_TEST.ALERTS_FK3) violated - child record found] in [DELETE FROM events WHERE (objectid IN (20785)) AND object=0]
      ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-02292: integrity constraint (ZABBIX_TEST.ESCALATIONS_FK2) violated - child record found[/var/www/zabbix/include/db.inc.php:507]
      SQL error [ORA-02292: integrity constraint (ZABBIX_TEST.ESCALATIONS_FK2) violated - child record found] in [DELETE FROM triggers WHERE (triggerid IN (20785)) ]

      where

      CONSTRAINT alerts_fk3 FOREIGN KEY (eventid) REFERENCES zabbix_test.events (eventid);
      CONSTRAINT escalations_fk2 FOREIGN KEY (triggerid) REFERENCES zabbix_test.triggers (triggerid)

      need

      + DELETE FROM alerts WHERE eventid IN (SELECT eventid FROM events WHERE (objectid IN (20785)) AND object=0);
      + DELETE FROM escalations WHERE eventid IN (SELECT eventid FROM events WHERE (objectid IN (20785)) AND object=0);
      DELETE FROM events WHERE (objectid IN (20785)) AND object=0;
      DELETE FROM triggers WHERE (triggerid IN (20785));

            Assignee:
            Unassigned
            Reporter:
            Alexey Pustovalov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: