X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fpool.cl;h=9e94deab90fe9390ef32ae2ca46cfe1cd91b40de;hb=b55c36d4d3835550407db78b1baa76a0bffdc5c1;hp=bf790a46c58b6dae9034ef5204c52f44ea572a6f;hpb=a01be1182a7df36a329ee6384e8e403adb2ed9b1;p=clsql.git diff --git a/sql/pool.cl b/sql/pool.cl index bf790a4..9e94dea 100644 --- a/sql/pool.cl +++ b/sql/pool.cl @@ -7,7 +7,7 @@ ;;;; Programmers: Kevin M. Rosenberg, Marc Battyani ;;;; Date Started: Apr 2002 ;;;; -;;;; $Id: pool.cl,v 1.3 2002/05/01 20:22:16 marc.battyani Exp $ +;;;; $Id: pool.cl,v 1.4 2002/05/03 20:50:18 marc.battyani Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -43,7 +43,8 @@ (defun clear-conn-pool (pool) (loop for conn across (all-connections pool) - do (disconnect :database conn)) + do (setf (conn-pool conn) nil) + (disconnect :database conn)) (setf (fill-pointer (free-connections pool)) 0) (setf (fill-pointer (all-connections pool)) 0)) @@ -59,7 +60,8 @@ conn-pool)) (defun acquire-from-pool (connection-spec database-type &optional pool) - (unless pool (setf pool (find-or-create-conn-pool connection-spec database-type))) + (unless (typep pool 'conn-pool) + (setf pool (find-or-create-conn-pool connection-spec database-type))) (acquire-from-conn-pool pool)) (defun release-to-pool (database)