From b7ad24a26662eba173730a7c3818ab0c0fb26874 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 4 Jan 2018 17:22:51 -0500 Subject: [PATCH] revert the triggers to update Monitor Stats. THey just don't work --- db/zm_update-1.31.19.sql | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/db/zm_update-1.31.19.sql b/db/zm_update-1.31.19.sql index 1c1b02b38..a33f94944 100644 --- a/db/zm_update-1.31.19.sql +++ b/db/zm_update-1.31.19.sql @@ -18,40 +18,6 @@ end; delimiter ; -drop procedure if exists update_monitor_stats; - -delimiter // - -create procedure update_monitor_stats(IN MonitorId int(10), IN increment INT, IN space BIGINT) - -sql security invoker - -deterministic - -begin - - update Monitors set - TotalEvents = TotalEvents + increment, - TotalEventDiskSpace = TotalEventDiskSpace + increment * space, - HourEvents = HourEvents + increment, - HourEventDiskSpace = HourEventDiskSpace + increment * space, - DayEvents = DayEvents + increment, - DayEventDiskSpace = DayEventDiskSpace + increment * space, - WeekEvents = WeekEvents + increment, - WeekEventDiskSpace = WeekEventDiskSpace + increment * space, - MonthEvents = MonthEvents + increment, - MonthEventDiskSpace = MonthEventDiskSpace + increment * space, - ArchivedEvents = ArchivedEvents + increment, - ArchivedEventDiskSpace = ArchivedEventDiskSpace + increment * space - where Id = MonitorId; - -end; - -// - -delimiter ; - - drop trigger if exists event_update_trigger; delimiter // @@ -76,9 +42,6 @@ begin call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); END IF; - call update_monitor_stats( OLD.MonitorId, -1, OLD.DiskSpace ); - call update_monitor_stats( NEW.MonitorId, 1, NEW.DiskSpace ); - end; // @@ -100,7 +63,6 @@ for each row begin call update_storage_stats(NEW.StorageId, NEW.DiskSpace); - call update_monitor_stats( NEW.MonitorId, 1, NEW.DiskSpace ); end; @@ -124,7 +86,6 @@ for each row begin call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); - call update_monitor_stats( OLD.MonitorId, -1, OLD.DiskSpace ); end;