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.jack...@eu.citrix.com> --- mg-schema-test-database | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mg-schema-test-database b/mg-schema-test-database index a82c044..0517ca3 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -509,19 +509,20 @@ END 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 -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel