Otherwise it takes effect for the rest of the script, which is not
what is wanted ! As it happens, there are no accesses to the real db
after this point, so this bug is latent.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
printf "borrow..."
for task in $tasks; do
- withtest psql_do <<END
+ (withtest psql_do <<END
BEGIN;
UPDATE resources
SET owntaskid = $(taskid magic idle)
WHERE owntaskid = $(borrowtaskid $task);
COMMIT;
END
+ )
done
- withtest psql_do <<END
+ (withtest psql_do <<END
DELETE FROM tasks
WHERE type='xdbref' AND refkey='$dbname';
END
-
+ )
printf "\n"
cat <<END