From: Kevin M. Rosenberg Date: Tue, 23 Apr 2002 18:28:02 +0000 (+0000) Subject: r1791: * interfaces/postgresql/postgresql-sql.cl: X-Git-Tag: v3.8.6~1144 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=0fe44ce81f47c779d9695c9211668b4780bf4216 r1791: * interfaces/postgresql/postgresql-sql.cl: Fix keyword typo in database-read-large-object * interfaces/mysql/mysql-loader.cl Fix loading on Win32 * test-suite/tester-clsql.cl Fix type coercion of double-float --- diff --git a/ChangeLog b/ChangeLog index f2e54ff..d3e9e09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +23 Apr 2002 Kevin Rosenberg (kevin@rosenberg.net) + * interfaces/postgresql/postgresql-sql.cl: + Fix keyword typo in database-read-large-object + * interfaces/mysql/mysql-loader.cl + Fix loading on Win32 + * test-suite/tester-clsql.cl + Fix type coercion of double-float + 19 Apr 2002 Marc Battyani (marc.battyani@fractalconcept.com) * interface/postgresql/postgresql-api.cl: * interface/postgresql/postgresql-sql.cl: diff --git a/VERSION b/VERSION index b87ff29..e83707c 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ -0.6.7 +0.6.8 diff --git a/interfaces/mysql/mysql-loader.cl b/interfaces/mysql/mysql-loader.cl index fcc31e6..0ff1ad2 100644 --- a/interfaces/mysql/mysql-loader.cl +++ b/interfaces/mysql/mysql-loader.cl @@ -7,7 +7,7 @@ ;;;; Programmers: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: mysql-loader.cl,v 1.5 2002/04/06 22:27:41 kevin Exp $ +;;;; $Id: mysql-loader.cl,v 1.6 2002/04/23 18:28:02 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -71,12 +71,12 @@ set to the right path before compiling or loading the system.") *mysql-library-candidate-directories* :drive-letters *mysql-library-candidate-drive-letters*))) + ;; zlib required to load mysql on CMUCL Solaris + (uffi:load-foreign-library + (uffi:find-foreign-library '("libz" "zlib") + '("/usr/lib/" "/usr/local/" "/lib/"))) (when (and - ;; zlib required to load mysql on CMUCL Solaris - (uffi:load-foreign-library - (uffi:find-foreign-library '("libz" "zlib") - '("/usr/lib/" "/usr/local/" "/lib/"))) (uffi:load-foreign-library mysql-path :module "mysql" :supporting-libraries diff --git a/interfaces/postgresql/postgresql-sql.cl b/interfaces/postgresql/postgresql-sql.cl index 21cb247..4104afa 100644 --- a/interfaces/postgresql/postgresql-sql.cl +++ b/interfaces/postgresql/postgresql-sql.cl @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-sql.cl,v 1.13 2002/04/19 20:25:20 marc.battyani Exp $ +;;;; $Id: postgresql-sql.cl,v 1.14 2002/04/23 18:28:02 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -315,7 +315,8 @@ (setf length (lo-lseek ptr fd 0 2)) (lo-lseek ptr fd 0 0) (when (> length 0) - (setf buffer (uffi:allocate-foreign-string length :type '(:unsigned :byte))) + (setf buffer (uffi:allocate-foreign-string + length :unsigned t)) (when (= (lo-read ptr fd buffer length) length) (setf result (uffi:convert-from-foreign-string buffer :length length :null-terminated-p nil)))))) diff --git a/test-suite/tester-clsql.cl b/test-suite/tester-clsql.cl index 03045fa..1e3fd78 100644 --- a/test-suite/tester-clsql.cl +++ b/test-suite/tester-clsql.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Mar 2002 ;;;; -;;;; $Id: tester-clsql.cl,v 1.5 2002/04/19 20:25:20 marc.battyani Exp $ +;;;; $Id: tester-clsql.cl,v 1.6 2002/04/23 18:28:02 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -137,7 +137,7 @@ ;;;; Testing functions (defun transform-float-1 (i) - (* i (abs (/ i 2)) (expt 10 (* 2 i)))) + (coerce (* i (abs (/ i 2)) (expt 10 (* 2 i))) 'double-float)) (defun transform-bigint-1 (i) (* i (expt 10 (* 3 (abs i))))) @@ -202,13 +202,14 @@ (format nil "Invalid types field (~S) passed to test-table-row" types)))) (test (transform-float-1 int) float - :test #'= + :test #'eql :fail-info (format nil "Wrong float value ~A for int ~A (row ~S)" float int row)) - (test (parse-double str) - float - :test #'eql - :fail-info (format nil "Wrong string value ~A" str)))) + (test (parse-double str) + float + :test #'eql + :fail-info (format nil "Wrong string value ~A for double ~A (row ~S)" + float str row)))) (defun drop-test-table (db) @@ -218,12 +219,13 @@ (defun do-test () (let ((specs (read-specs))) - (mysql-low-level specs) - (mysql-table-test specs) - (pgsql-table-test specs) - (pgsql-socket-table-test specs) - (aodbc-table-test specs) - )) + (with-tests (:name "CLSQL") + (mysql-low-level specs) + (mysql-table-test specs) + (pgsql-table-test specs) + (pgsql-socket-table-test specs) + (aodbc-table-test specs) + ))) (do-test)