X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fpool.lisp;h=f3645086e6920decb5c87a9ba7a624f5c6ca47b0;hb=f3430ff34ef6631daf20cb9c69ecbc7ad84d14df;hp=d1c0a230bc43255f8d9b3940286e1545c3e7d50d;hpb=e470d9172c6cb819691eb5a00831f01d5eeed8ce;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)))))