[ZBX-4233] error in query when deleting an active maintenance Created: 2011 Oct 13  Updated: 2017 May 30  Resolved: 2011 Oct 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.9.7 (beta)
Fix Version/s: 1.9.7 (beta)

Type: Incident report Priority: Critical
Reporter: Aleksandrs Saveljevs Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates ZBXNEXT-910 Redesign Configuration->Maintenance Closed

 Description   

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.



 Comments   
Comment by Igor Danoshaites (Inactive) [ 2011 Oct 14 ]

Has been fixed in dev branch ZBXNEXT-910 in rev #22387.

Comment by Eduards Samersovs (Inactive) [ 2011 Oct 17 ]

trunk revision 22442

Generated at Sat Apr 20 06:34:34 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.