From eaea8232bda93fd38410e46dd22ec954b2fc4a18 Mon Sep 17 00:00:00 2001 From: Kevin Rosenberg Date: Mon, 31 Aug 2009 18:59:25 -0600 Subject: [PATCH] Version 4.0.6 * sql/database.lisp: Fix syntax on process-lock (thanks to Stian Sletner) * db-mysql/mysql-sql.lisp: Allow use of database parameter in database-list function (thanks to Michael Pheasant) * sql/oodml.lisp: Allow NULL values for floating-point fields (thanks to Jan Rychter) --- ChangeLog | 9 +++++++++ db-mysql/mysql-api.lisp | 4 +--- db-mysql/mysql-client-info.lisp | 5 ++++- db-mysql/mysql-sql.lisp | 4 ++-- debian/changelog | 6 ++++++ sql/database.lisp | 2 +- sql/oodml.lisp | 6 ++++-- 7 files changed, 27 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a196d6..3e6051d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +31 Aug 2009 Kevin Rosenberg + * Version 4.0.6 + * sql/database.lisp: Fix syntax on process-lock (thanks to + Stian Sletner) + * db-mysql/mysql-sql.lisp: Allow use of database parameter + in database-list function (thanks to Michael Pheasant) + * sql/oodml.lisp: Allow NULL values for floating-point fields + (thanks to Jan Rychter) + 02 Jun 2009 Kevin Rosenberg * Version 4.0.5 * sql/database.lisp: Add process-lock for deleting database from diff --git a/db-mysql/mysql-api.lisp b/db-mysql/mysql-api.lisp index 59cbe8c..1f747f9 100644 --- a/db-mysql/mysql-api.lisp +++ b/db-mysql/mysql-api.lisp @@ -8,9 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id$ -;;;; -;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg +;;;; This file, part of CLSQL, is Copyright (c) 2002-2009 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai ;;;; ;;;; CLSQL users are granted the rights to distribute and use this software diff --git a/db-mysql/mysql-client-info.lisp b/db-mysql/mysql-client-info.lisp index 0721194..54d9724 100644 --- a/db-mysql/mysql-client-info.lisp +++ b/db-mysql/mysql-client-info.lisp @@ -42,7 +42,10 @@ (string-equal "4.1" *mysql-client-info* :end2 3)) (pushnew :mysql-client-v4.1 cl:*features*))) ((eql (schar *mysql-client-info* 0) #\5) - (pushnew :mysql-client-v5 cl:*features*)) + (pushnew :mysql-client-v5 cl:*features*) + (when (and (>= (length *mysql-client-info*) 3) + (string-equal "5.1" *mysql-client-info* :end2 3)) + (pushnew :mysql-client-v5.1 cl:*features*))) (t (error "Unknown mysql client version '~A'." *mysql-client-info*))))) diff --git a/db-mysql/mysql-sql.lisp b/db-mysql/mysql-sql.lisp index 36fc90a..7c332cf 100644 --- a/db-mysql/mysql-sql.lisp +++ b/db-mysql/mysql-sql.lisp @@ -475,8 +475,8 @@ (defmethod database-list (connection-spec (type (eql :mysql))) (destructuring-bind (host name user password &optional port) connection-spec - (declare (ignore name)) - (let ((database (database-connect (list host "mysql" user password port) type))) + (let ((database (database-connect (list host (or name "mysql") + user password port) type))) (unwind-protect (progn (setf (slot-value database 'clsql-sys::state) :open) diff --git a/debian/changelog b/debian/changelog index 9b1ac9c..b7950eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-sql (4.0.6-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Mon, 31 Aug 2009 14:36:30 -0600 + cl-sql (4.0.5-5) unstable; urgency=low * debian/rules: Fix bug introduced by change to dh-lisp (closes:540816) diff --git a/sql/database.lisp b/sql/database.lisp index 14bcdc8..f23eea2 100644 --- a/sql/database.lisp +++ b/sql/database.lisp @@ -166,7 +166,7 @@ from a pool it will be released to this pool." (let ((database (find-database database :errorp (and database error)))) (when database (if (conn-pool database) - (with-process-lock ((conn-pool-lock pool) "Delete from pool") + (with-process-lock ((conn-pool-lock (conn-pool database)) "Delete from pool") (when (release-to-pool database) (setf *connected-databases* (delete database *connected-databases*)) (when (eq database *default-database*) diff --git a/sql/oodml.lisp b/sql/oodml.lisp index cc57941..f797be0 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -495,8 +495,10 @@ (defmethod database-output-sql-as-type ((type (eql 'float)) val database db-type) (declare (ignore database db-type)) - (let ((*read-default-float-format* (type-of val))) - (format nil "~F" val))) + (if (eq (type-of val) 'null) + nil + (let ((*read-default-float-format* (type-of val))) + (format nil "~F" val)))) (defmethod read-sql-value (val type database db-type) (declare (ignore type database db-type)) -- 2.34.1