Skip to content
Permalink
Browse files

fixed trigger bug introduced with commit 085c139

  • Loading branch information...
following
following committed Apr 25, 2013
1 parent e53cd87 commit 7d190bdebbf69a46e42a17d929adbdab159b7cd9
Showing with 10 additions and 4 deletions.
  1. +10 −4 htdocs/doc/sql/stored-proc/maintain.php
@@ -1398,7 +1398,9 @@
sql("CREATE TRIGGER `coordinatesAfterInsert` AFTER INSERT ON `coordinates`
FOR EACH ROW
BEGIN
CALL sp_update_cache_listingdate(NEW.`cache_id`);
IF NEW.`type`=1 THEN
CALL sp_update_cache_listingdate(NEW.`cache_id`);
END IF;
END;");
sql_dropTrigger('coordinatesBeforeUpdate');
@@ -1415,8 +1417,10 @@
sql("CREATE TRIGGER `coordinatesAfterUpdate` AFTER UPDATE ON `coordinates`
FOR EACH ROW
BEGIN
CALL sp_update_cache_listingdate(NEW.`cache_id`);
IF OLD.`cache_id`!=NEW.`cache_id` THEN
IF NEW.`type`=1 THEN
CALL sp_update_cache_listingdate(NEW.`cache_id`);
END IF;
IF OLD.`cache_id`!=NEW.`cache_id` AND OLD.`type`=1 THEN
CALL sp_update_cache_listingdate(OLD.`cache_id`);
END IF;
END;");
@@ -1425,7 +1429,9 @@
sql("CREATE TRIGGER `coordinatesAfterDelete` AFTER DELETE ON `coordinates`
FOR EACH ROW
BEGIN
CALL sp_update_cache_listingdate(OLD.`cache_id`);
IF OLD.`type`=1 THEN
CALL sp_update_cache_listingdate(OLD.`cache_id`);
END IF;
END;");
sql_dropTrigger('savedTextsBeforeInsert');

0 comments on commit 7d190bd

Please sign in to comment.
You can’t perform that action at this time.