X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fpool.lisp;h=f3645086e6920decb5c87a9ba7a624f5c6ca47b0;hb=d2518bfbfd6a222e6f022ebd52ccce86fa2af926;hp=d1c0a230bc43255f8d9b3940286e1545c3e7d50d;hpb=09a2bc41215abb9dd9c92db6cb70e04fa845f938;p=clsql.git diff --git a/sql/pool.lisp b/sql/pool.lisp index d1c0a23..f364508 100644 --- a/sql/pool.lisp +++ b/sql/pool.lisp @@ -44,7 +44,8 @@ command to put the connection back into its default state." (handler-case (case (database-underlying-type pconn) (:postgresql - (database-execute-command "RESET ALL" pconn)) + ;; This resets the connection to "New" state + (database-execute-command "DISCARD ALL;" pconn)) (:mysql (database-query "SHOW ERRORS LIMIT 1" pconn nil nil)) (:mssql @@ -74,7 +75,7 @@ Disconnecting.~%" (setf (conn-pool conn) pool)) conn))) -(defun release-to-conn-pool (conn) +(defmethod release-to-conn-pool (conn) (let ((pool (conn-pool conn))) (with-process-lock ((conn-pool-lock pool) "Release to pool") (vector-push-extend conn (free-connections pool)))))