From: Ryan Davis Date: Thu, 26 Jul 2012 20:59:52 +0000 (-0400) Subject: comment fix and added a TODO, some connection pooling scenarios X-Git-Tag: v6.3.0~11 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=ba3a0f54ddd51bc3a45acace5a410565e023d71a comment fix and added a TODO, some connection pooling scenarios can lose autocommit configuration --- diff --git a/sql/transaction.lisp b/sql/transaction.lisp index a9d94c9..a2fdda3 100644 --- a/sql/transaction.lisp +++ b/sql/transaction.lisp @@ -41,6 +41,8 @@ is called on DATABASE which defaults to *DEFAULT-DATABASE*." (setf (transaction database) (make-instance 'transaction :previous-autocommit (database-autocommit database)))) + ;; TODO: database-autocommit might get lost in some scenarios + ;; when pooling connections (setf (database-autocommit database) nil) (when (= (incf (transaction-level database)) 1) (let ((transaction (transaction database))) @@ -52,7 +54,7 @@ is called on DATABASE which defaults to *DEFAULT-DATABASE*." (:mssql (execute-command "BEGIN TRANSACTION" :database database)) (t (execute-command "BEGIN" :database database)))))) -;;ODBC should potentially be using it's scheme for transactions: +;;ODBC should potentially be using the following scheme for transactions: ;; turn off autocommit for begin. then use sqlendtran (or maybe sqltransact) ;; whatever is appropriate for this version of odbc. (defmethod database-commit-transaction ((database database))