From 1b0f85909248ac92d13f4af72d69ef68ffeb890c Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 7 Sep 2004 20:45:43 +0000 Subject: [PATCH] r9977: 07 Sep 2004 Kevin Rosenberg * Version 3.0.3 Release * db-postgresql-socket/postgresql-socket-api.lisp: Commit patch from Tagore Smith to call force-output after sending authentication * db-odbc/odbc-api.lisp: Move ODBC v3 conversons * db-odbc/odbc-sql.lisp: Load mysql or postgresql package when connecting to a database of that type so that functions that indicate capabilities of database are available. --- ChangeLog | 9 +++++++++ db-odbc/odbc-api.lisp | 6 +++--- db-odbc/odbc-constants.lisp | 2 +- db-odbc/odbc-ff-interface.lisp | 2 ++ db-odbc/odbc-sql.lisp | 5 +++++ db-postgresql-socket/postgresql-socket-api.lisp | 9 ++++++--- debian/changelog | 6 ++++++ 7 files changed, 32 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index e32893b..fa9a562 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +07 Sep 2004 Kevin Rosenberg + * Version 3.0.3 Release + * db-postgresql-socket/postgresql-socket-api.lisp: Commit patch + from Tagore Smith to call force-output after sending authentication + * db-odbc/odbc-api.lisp: Move ODBC v3 conversons + * db-odbc/odbc-sql.lisp: Load mysql or postgresql package when connecting + to a database of that type so that functions that indicate capabilities of + database are available. + 02 Sep 2004 Kevin Rosenberg * db-odbc/odbc-api.lisp: More conversions to ODBC v3 diff --git a/db-odbc/odbc-api.lisp b/db-odbc/odbc-api.lisp index 4095f6c..aa5bbbc 100644 --- a/db-odbc/odbc-api.lisp +++ b/db-odbc/odbc-api.lisp @@ -249,11 +249,11 @@ as possible second argument) to the desired representation of date/time/timestam (defun %new-statement-handle (hdbc) (let ((statement-handle - (with-foreign-object (hstmt-ptr 'sql-handle) + (with-foreign-object (phstmt 'sql-handle) (with-error-handling (:hdbc hdbc) - (SQLAllocStmt hdbc hstmt-ptr) - (deref-pointer hstmt-ptr 'sql-handle))))) + (SQLAllocHandle $SQL_HANDLE_STMT hdbc phstmt) + (deref-pointer phstmt 'sql-handle))))) (if (uffi:null-pointer-p statement-handle) (error 'clsql:sql-database-error :message "Received null statement handle.") statement-handle))) diff --git a/db-odbc/odbc-constants.lisp b/db-odbc/odbc-constants.lisp index e6cc0bd..0315e44 100644 --- a/db-odbc/odbc-constants.lisp +++ b/db-odbc/odbc-constants.lisp @@ -1,4 +1,4 @@ -;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: odbc -*- + ;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: odbc -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; diff --git a/db-odbc/odbc-ff-interface.lisp b/db-odbc/odbc-ff-interface.lisp index 7b78023..d26648c 100644 --- a/db-odbc/odbc-ff-interface.lisp +++ b/db-odbc/odbc-ff-interface.lisp @@ -38,6 +38,7 @@ :module "odbc" :returning :short) ; RETCODE_SQL_API +;; deprecated (def-function "SQLAllocConnect" ((henv sql-handle) ; HENV henv (*phdbc sql-handle-ptr) ; HDBC FAR *phdbc @@ -75,6 +76,7 @@ :module "odbc" :returning :short) ; RETCODE_SQL_API +;; deprecated (def-function "SQLAllocStmt" ((hdbc sql-handle) ; HDBC hdbc (*phstmt sql-handle-ptr) ; HSTMT FAR *phstmt diff --git a/db-odbc/odbc-sql.lisp b/db-odbc/odbc-sql.lisp index 31d8a4e..c28e937 100644 --- a/db-odbc/odbc-sql.lisp +++ b/db-odbc/odbc-sql.lisp @@ -71,9 +71,14 @@ (cond ((or (search "postgresql" server-name :test #'char-equal) (search "postgresql" dbms-name :test #'char-equal)) + (unless (find-package 'clsql-postgresql) + (ignore-errors (asdf:operate 'asdf:load-op 'clsql-postgresql-socket))) :postgresql) ((or (search "mysql" server-name :test #'char-equal) (search "mysql" dbms-name :test #'char-equal)) + (unless (find-package 'clsql-mysql) + ;; ignore errors on platforms where the shared libraries are not available + (ignore-errors (asdf:operate 'asdf:load-op 'clsql-mysql))) :mysql) ((or (search "oracle" server-name :test #'char-equal) (search "oracle" dbms-name :test #'char-equal)) diff --git a/db-postgresql-socket/postgresql-socket-api.lisp b/db-postgresql-socket/postgresql-socket-api.lisp index a6cc666..ba0cd22 100644 --- a/db-postgresql-socket/postgresql-socket-api.lisp +++ b/db-postgresql-socket/postgresql-socket-api.lisp @@ -458,14 +458,16 @@ connection, if it is still open." (3 (send-unencrypted-password-message socket - (postgresql-connection-password connection))) + (postgresql-connection-password connection)) + (force-output socket)) (4 (let ((salt (make-string 2))) (read-socket-sequence salt socket) (send-encrypted-password-message socket (crypt-password - (postgresql-connection-password connection) salt)))) + (postgresql-connection-password connection) salt))) + (force-output socket)) (5 (let ((salt (make-string 4))) (read-socket-sequence salt socket) @@ -474,7 +476,8 @@ connection, if it is still open." (pwd (encrypt-md5 pwd2 salt))) (send-encrypted-password-message socket - (concatenate 'string "md5" pwd))))) + (concatenate 'string "md5" pwd)))) + (force-output socket)) (t (error 'postgresql-login-error :connection connection diff --git a/debian/changelog b/debian/changelog index 285de5e..ac6919b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-sql (3.0.3-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Tue, 7 Sep 2004 14:45:27 -0600 + cl-sql (3.0.2-1) unstable; urgency=low * New upstream -- 2.34.1