From ba8e1b6858fbb883c69e6c09d37b1945878ccba3 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sat, 12 Aug 2006 19:43:22 +0000 Subject: [PATCH] r11014: 12 Aug 2006 Kevin Rosenberg * Version 3.6.4 * clsql.asd: Add support for c:\etc\clsql-init.lisp as possible local initialization file * db-mysql/mysql-loader.lisp: Remove former method of using pathnames as name candidates. * db-odbc/odbc-api.lisp: Work-around Allegro/Windows FFI bug that generates incorrect integer return type --- ChangeLog | 9 +++++++++ clsql.asd | 6 ++++-- db-mysql/mysql-loader.lisp | 14 +++++--------- db-odbc/odbc-api.lisp | 14 ++++++++++++-- debian/changelog | 6 ++++++ 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index be823f7..65d2952 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +12 Aug 2006 Kevin Rosenberg + * Version 3.6.4 + * clsql.asd: Add support for c:\etc\clsql-init.lisp as possible + local initialization file + * db-mysql/mysql-loader.lisp: Remove former method of using pathnames + as name candidates. + * db-odbc/odbc-api.lisp: Work-around Allegro/Windows FFI bug + that generates incorrect integer return type + 07 Jul 2006 Kevin Rosenberg * Version 3.6.3 * sql/transactions.lisp: Important typo fix from Alexey Antipov diff --git a/clsql.asd b/clsql.asd index c70fd78..2f3868c 100644 --- a/clsql.asd +++ b/clsql.asd @@ -18,7 +18,7 @@ (defpackage #:clsql-system (:use #:asdf #:cl)) (in-package #:clsql-system) -;; need to load uffi for below perform :after method +;; need to load uffi for below perform :after method (eval-when (:compile-toplevel :load-toplevel :execute) (unless (find-package 'uffi) (asdf:operate 'asdf:load-op 'uffi))) @@ -92,6 +92,8 @@ oriented interface." (defmethod perform :after ((o load-op) (c (eql (find-system 'clsql)))) (let* ((init-var (uffi:getenv "CLSQLINIT")) (init-file (or (when init-var (probe-file init-var)) - (probe-file "/etc/clsql-init.lisp")))) + (probe-file "/etc/clsql-init.lisp") + #+(or mswin windows win32) + (probe-file "c:\\etc\\clsql-init.lisp")))) (when init-file (load init-file)))) diff --git a/db-mysql/mysql-loader.lisp b/db-mysql/mysql-loader.lisp index b102fcb..aa90322 100644 --- a/db-mysql/mysql-loader.lisp +++ b/db-mysql/mysql-loader.lisp @@ -18,13 +18,9 @@ (in-package #:mysql) -(defparameter *clsql-mysql-library-candidate-names* +(defparameter *clsql-mysql-library-candidate-names* (list #+(or 64bit x86-64) "clsql_mysql64" - #+(or 64bit x86-64) (make-pathname :name "clsql_mysql64" - :directory (pathname-directory *load-truename*)) - "clsql_mysql" - (make-pathname :name "clsql_mysql" - :directory (pathname-directory *load-truename*)))) + "clsql_mysql")) (defvar *mysql-library-candidate-names* '("libmysqlclient" "libmysql")) @@ -39,13 +35,13 @@ set to the right path before compiling or loading the system.") (defmethod clsql-sys:database-type-library-loaded ((database-type (eql :mysql))) *mysql-library-loaded*) - + (defmethod clsql-sys:database-type-load-foreign ((database-type (eql :mysql))) (clsql-uffi:find-and-load-foreign-library *mysql-library-candidate-names* - :module "mysql" + :module "mysql" :supporting-libraries *mysql-supporting-libraries*) (clsql-uffi:find-and-load-foreign-library *clsql-mysql-library-candidate-names* - :module "clsql-mysql" + :module "clsql-mysql" :supporting-libraries *mysql-supporting-libraries*) (setq *mysql-library-loaded* t)) diff --git a/db-odbc/odbc-api.lisp b/db-odbc/odbc-api.lisp index 1896a47..4719d73 100644 --- a/db-odbc/odbc-api.lisp +++ b/db-odbc/odbc-api.lisp @@ -99,6 +99,17 @@ as possible second argument) to the desired representation of date/time/timestam odbc-call &body body) (let ((result-code (gensym "RC-"))) `(let ((,result-code ,odbc-call)) + + ;; Check for allegro v7 & v8 bug with ODBC calls returning + ;; 32-bit unsigned ints, not 16-bit signed ints + #+(and allegro mswindows) + (when (> ,result-code #xFFFF) + (warn (format nil "16-bit return bug: result-code #x~X for expression ~S" + ,result-code (quote ,odbc-call))) + (setq ,result-code (logand ,result-code #xFFFF)) + (when (> ,result-code #x7FFF) + (setq ,result-code (- ,result-code #x10000)))) + (case ,result-code (#.$SQL_SUCCESS (progn ,result-code ,@body)) @@ -132,8 +143,7 @@ as possible second argument) to the desired representation of date/time/timestam :secondary-error-id sql-state))) (#.$SQL_NO_DATA_FOUND (progn ,result-code ,@body)) - ;; work-around for Allegro 7.0beta AMD64 which - ;; has for negative numbers + ;; work-around for Allegro 7.0beta AMD64 which returns negative numbers (otherwise (multiple-value-bind (error-message sql-state) (handle-error (or ,henv +null-handle-ptr+) diff --git a/debian/changelog b/debian/changelog index 5181d0f..6719c0f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-sql (3.6.4-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Sat, 12 Aug 2006 10:18:05 -0600 + cl-sql (3.6.3-1) unstable; urgency=low * New upstream -- 2.34.1