Changeset 19959 for trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
- Timestamp:
- Oct 7, 2008, 11:53:21 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
r19792 r19959 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: SQL.pm,v 1.6 5 2008-10-01 02:06:17jhoblitt Exp $3 # $Id: SQL.pm,v 1.66 2008-10-07 21:53:21 jhoblitt Exp $ 4 4 5 5 package Nebulous::Server::SQL; … … 498 498 DECLARE xattrvar BOOLEAN; 499 499 DECLARE trans_level VARCHAR(255); 500 DECLARE cur1 CURSOR FOR SELECT vol_id, name, host, path, allocate, available, xattr FROM v olume;500 DECLARE cur1 CURSOR FOR SELECT vol_id, name, host, path, allocate, available, xattr FROM v; 501 501 DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = TRUE; 502 502 503 CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW v AS SELECT * FROM volume; 503 504 -- store the current transaction level 504 SELECT @@session.tx_isolation INTO trans_level;505 -- SELECT @@session.tx_isolation INTO trans_level; 505 506 506 507 -- set trans level to repeatable-read so the volume table does not change 507 508 -- out from under our cursor 508 SET @@session.tx_isolation = 'REPEATABLE-READ';509 -- SET @@session.tx_isolation = 'REPEATABLE-READ'; 509 510 510 511 -- iterate over the volume table finding the coresponding entry in the … … 531 532 532 533 -- restore the original transaction level 533 SET @@session.tx_isolation = trans_level; 534 534 -- SET @@session.tx_isolation = trans_level; 535 536 DROP VIEW v; 535 537 COMMIT; 536 538 END
Note:
See TracChangeset
for help on using the changeset viewer.
