From 1df8353cc15bcbf98078605cb6955aafa622ecea Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 25 May 2004 04:24:16 +0000 Subject: [PATCH] r9466: avoid interrupts in setting sequence position --- ChangeLog | 3 ++- db-oracle/oracle-sql.lisp | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 902adfc..ef4b54b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,8 @@ * CONTRIBUTORS: Add note about Marcus' excellent work * sql/oodml.lisp: Removed old stub function * clsql.asd: Use module names in current package rather than keyword package - * db-oracle/oracle-sql.lisp: Don't trim trailing spaces + * db-oracle/oracle-sql.lisp: Don't trim trailing spaces. Prevent interrupts + in setting sequence position * tests/test-init.lisp: Skip 2 tests on Oracle which have unsupported syntax 24 May 2004: Marcus Pearce (m.t.pearce@city.ac.uk) diff --git a/db-oracle/oracle-sql.lisp b/db-oracle/oracle-sql.lisp index 9a7db75..b5876d4 100644 --- a/db-oracle/oracle-sql.lisp +++ b/db-oracle/oracle-sql.lisp @@ -901,17 +901,17 @@ the length of that format.") ) database :auto nil))) -;; FIXME: use lock (defmethod database-set-sequence-position (name position (database oracle-database)) - (let* ((next (database-sequence-next name database)) - (incr (- position next))) - (database-execute-command - (format nil "ALTER SEQUENCE ~A INCREMENT BY ~D" name incr) - database) - (database-sequence-next name database) - (database-execute-command - (format nil "ALTER SEQUENCE ~A INCREMENT BY 1" name) - database))) + (without-interrupts + (let* ((next (database-sequence-next name database)) + (incr (- position next))) + (database-execute-command + (format nil "ALTER SEQUENCE ~A INCREMENT BY ~D" name incr) + database) + (database-sequence-next name database) + (database-execute-command + (format nil "ALTER SEQUENCE ~A INCREMENT BY 1" name) + database)))) (defmethod database-list-sequences ((database oracle-database) &key owner) (let ((query -- 2.34.1