From: <sc...@hy...> - 2007-09-06 21:01:29
|
Author: scottmf Date: 2007-09-06 14:01:26 -0700 (Thu, 06 Sep 2007) New Revision: 5824 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=5824 Modified: branches/MYSQL_3_1/src/org/hyperic/hq/product/server/mbean/DatabaseInitializer.java Log: corrected an error in file Modified: branches/MYSQL_3_1/src/org/hyperic/hq/product/server/mbean/DatabaseInitializer.java =================================================================== --- branches/MYSQL_3_1/src/org/hyperic/hq/product/server/mbean/DatabaseInitializer.java 2007-09-06 20:51:34 UTC (rev 5823) +++ branches/MYSQL_3_1/src/org/hyperic/hq/product/server/mbean/DatabaseInitializer.java 2007-09-06 21:01:26 UTC (rev 5824) @@ -206,37 +206,6 @@ "PRIMARY KEY (seq_name, seq_val) " + ") ENGINE=MEMORY;"; - String getNextMemSeqval = - "CREATE PROCEDURE getNextMemSeqVal(iname VARCHAR(50), " + - "OUT rtn_val INT)" + - "BEGIN "+ - "DECLARE seq_count INT; " + - "DECLARE idx INT; " + - "DECLARE next_seq INT; " + - "DECLARE tmp INT; " + - "SELECT get_lock(\"seq_lock\", 60) into tmp; " + - "SELECT count(*) into seq_count from HQ_MEM_SEQUENCE" + - " WHERE seq_name = iname; " + - "IF seq_count = 0 THEN " + - "SET idx = 0; " + - "populate: LOOP " + - "IF idx >= 1000 " + - "THEN " + - "LEAVE populate; " + - "END IF; " + - "SET idx = idx + 1; " + - "select getNextHqSeqval(iname) into next_seq; " + - "insert into HQ_MEM_SEQUENCE (seq_name, seq_val)" + - " values (iname, next_seq);" + - "END LOOP populate; " + - "END IF; " + - "select min(seq_val) into rtn_val from HQ_MEM_SEQUENCE" + - " WHERE seq_name = iname; " + - "delete from HQ_MEM_SEQUENCE where seq_name = iname" + - " AND seq_val = rtn_val; " + - "SELECT release_lock(\"seq_lock\") into tmp; " + - "END;"; - String getNextHqSeqval = "CREATE FUNCTION getNextHqSeqval(iname CHAR(50)) " + "RETURNS INT " + |