X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-odbc%2Fodbc-dbi.lisp;h=0de8eddf4bd7bd58f27f845b664aeb6e9abbfea0;hb=f69c5bfba59d54628f9a08b83413ec3df3c92432;hp=c81f0842a9e78f347d0bd68d8bc50723185873bf;hpb=dd0b244d779d96f80e262e02ce4d2f793888b79f;p=clsql.git diff --git a/db-odbc/odbc-dbi.lisp b/db-odbc/odbc-dbi.lisp index c81f084..0de8edd 100644 --- a/db-odbc/odbc-dbi.lisp +++ b/db-odbc/odbc-dbi.lisp @@ -334,7 +334,7 @@ the query against." )) (if (plusp (column-count free-query)) ;; KMR: Added check for commands that don't return columns (values (db-fetch-query-results free-query nil) - (column-names free-query)) + (map 'list #'identity (column-names free-query))) (values (result-rows-count (hstmt free-query)) nil))) @@ -357,7 +357,7 @@ the query against." )) "get-free-query finds or makes a nonactive query object, and then sets it to active. This makes the functions db-execute-command and db-query thread safe." (with-slots (queries hdbc) database - (or (clsql-base-sys:without-interrupts + (or (clsql-base:without-interrupts (let ((inactive-query (find-if (lambda (query) (not (query-active-p query))) queries))) @@ -454,10 +454,11 @@ This makes the functions db-execute-command and db-query thread safe." (#.odbc::$SQL_C_DOUBLE :double) (#.odbc::$SQL_C_FLOAT :float) (#.odbc::$SQL_C_SSHORT :short) + (#.odbc::$SQL_C_STINYINT :short) (#.odbc::$SQL_BIGINT :short) (t t)))) (t - t))))) + t))))) query) (defun db-close-query (query &key drop-p) @@ -469,6 +470,7 @@ This makes the functions db-execute-command and db-query thread safe." (dotimes (col-nr count) (let ((data-ptr (aref column-data-ptrs col-nr)) (out-len-ptr (aref column-out-len-ptrs col-nr))) + (declare (ignorable data-ptr out-len-ptr)) ;; free-statment :unbind frees these #+ignore (when data-ptr (uffi:free-foreign-object data-ptr)) #+ignore (when out-len-ptr (uffi:free-foreign-object out-len-ptr))))) @@ -492,7 +494,7 @@ This makes the functions db-execute-command and db-query thread safe." column-data-ptrs column-out-len-ptrs column-precisions computed-result-types) query - (unless (= (SQLFetch hstmt) odbc::$SQL_NO_DATA_FOUND) + (unless (= (odbc::SQLFetch hstmt) odbc::$SQL_NO_DATA_FOUND) (values (loop for col-nr from 0 to (- column-count (if (eq ignore-columns :last) 2 1))