Permalink
Browse files

this shouldn't be done implicitly

  • Loading branch information...
1 parent bc2a42b commit 09c01abebf710a376040dab3458e151fe044fd72 @lestrrat lestrrat committed May 7, 2012
Showing with 0 additions and 20 deletions.
  1. +0 −20 misc/stf.sql
View
@@ -106,23 +106,3 @@ CREATE TABLE entity (
FOREIGN KEY(storage_id) REFERENCES storage(id) ON DELETE RESTRICT
) ENGINE=InnoDB;
-DELIMITER $$
-CREATE PROCEDURE stfVerifyClusterMode(x_cluster_id INT)
-BEGIN
- DECLARE good_count INT;
- SELECT COUNT(*) INTO good_count FROM storage WHERE cluster_id = x_cluster_id AND MODE = 1;
-
- IF ( good_count < 3 ) THEN
- UPDATE storage_cluster SET mode = 0 WHERE id = x_cluster_id;
- END IF;
-END
-$$
-
-CREATE TRIGGER storage_update_trig AFTER UPDATE ON storage
- FOR EACH ROW BEGIN
- CALL stfVerifyClusterMode(NEW.cluster_id);
- END;
-$$
-
-DELIMITER ;
-

0 comments on commit 09c01ab

Please sign in to comment.