error in query when deleting an active maintenance

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Critical
    • 1.9.7 (beta)
    • Affects Version/s: 1.9.7 (beta)
    • Component/s: Frontend (F)
    • None

      Inspired by ZBX-4227: in trunk, it is not possible to delete an active maintenance due to foreign key constraints:

      Error in query [DELETE FROM maintenances WHERE (maintenanceid IN ('2')) ] [Cannot delete or update a parent row: a foreign key constraint fails (`issue_dev_502`.`hosts`, CONSTRAINT `c_hosts_2` FOREIGN KEY (`maintenanceid`) REFERENCES `maintenances` (`maintenanceid`))]
      SQL statement execution has failed "DELETE FROM maintenances WHERE (maintenanceid IN ('2')) "

      Before deleting a maintenance, the GUI has to reset fields related to maintenance in the hosts table.

            Assignee:
            Unassigned
            Reporter:
            Aleksandrs Saveljevs
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: