Index: /trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
===================================================================
--- /trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm	(revision 13244)
+++ /trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm	(revision 13245)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: SQL.pm,v 1.38 2007-05-04 03:09:16 jhoblitt Exp $
+# $Id: SQL.pm,v 1.39 2007-05-04 21:20:43 jhoblitt Exp $
 
 package Nebulous::Server::SQL;
@@ -394,6 +394,13 @@
     DECLARE allocatevar BOOLEAN;
     DECLARE availablevar BOOLEAN;
+    DECLARE trans_level VARCHAR(255);
     DECLARE cur1 CURSOR FOR SELECT vol_id, name, path, allocate, available FROM volume;
     DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = TRUE;
+
+    -- store the current transaction level
+    SELECT @@session.tx_isolation INTO trans_level; 
+
+    -- set trans level
+    SET @@session.tx_isolation = 'REPEATABLE-READ';
 
     -- create a temp table to hold the merged results of the volume & mount
@@ -436,3 +443,6 @@
     
     CLOSE cur1;
+
+    -- restore the original transaction level
+    SET @@session.tx_isolation = trans_level;
 END 
Index: /trunk/Nebulous/lib/Nebulous/Server/SQL.pm
===================================================================
--- /trunk/Nebulous/lib/Nebulous/Server/SQL.pm	(revision 13244)
+++ /trunk/Nebulous/lib/Nebulous/Server/SQL.pm	(revision 13245)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: SQL.pm,v 1.38 2007-05-04 03:09:16 jhoblitt Exp $
+# $Id: SQL.pm,v 1.39 2007-05-04 21:20:43 jhoblitt Exp $
 
 package Nebulous::Server::SQL;
@@ -394,6 +394,13 @@
     DECLARE allocatevar BOOLEAN;
     DECLARE availablevar BOOLEAN;
+    DECLARE trans_level VARCHAR(255);
     DECLARE cur1 CURSOR FOR SELECT vol_id, name, path, allocate, available FROM volume;
     DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = TRUE;
+
+    -- store the current transaction level
+    SELECT @@session.tx_isolation INTO trans_level; 
+
+    -- set trans level
+    SET @@session.tx_isolation = 'REPEATABLE-READ';
 
     -- create a temp table to hold the merged results of the volume & mount
@@ -436,3 +443,6 @@
     
     CLOSE cur1;
+
+    -- restore the original transaction level
+    SET @@session.tx_isolation = trans_level;
 END 
