X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=db-odbc%2Fodbc-dbi.lisp;h=6e299d16e25929aeedab435ceeedfa45a36b4a2c;hb=f68abc76e0e01f4633141a0c17a4d8f1976229b8;hp=7656a65a83ad7dc033e93906688d0360d2eaee08;hpb=6d9165359a584853a2a230e1a2e27823a31841fb;p=clsql.git diff --git a/db-odbc/odbc-dbi.lisp b/db-odbc/odbc-dbi.lisp index 7656a65..6e299d1 100644 --- a/db-odbc/odbc-dbi.lisp +++ b/db-odbc/odbc-dbi.lisp @@ -125,7 +125,8 @@ the query against." )) (defun sql (expr &key db result-types row-count column-names query) (if query (db-query db expr) - (db-execute db expr))) + ;; fixme: don't return all query results. + (db-query db expr))) (defun close-query (result-set) (warn "Not implemented.")) @@ -243,13 +244,6 @@ the query against." )) out-len-ptr nil))))) query))))) -(defmacro without-interrupts (&body body) - #+lispworks `(mp:without-preemption ,@body) - #+allegro `(mp:without-scheduling ,@body) - #+cmu `(pcl::without-interrupts ,@body) - #+sbcl `(sb-sys::without-interrupts ,@body) - #+openmcl `(ccl:without-interrupts ,@body)) - (defmethod db-query ((database odbc-db) query-expression) (let ((free-query ;; make it thread safe @@ -285,7 +279,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) database - (or (without-interrupts ;; not context switch allowed here + (or (clsql-base-sys:without-interrupts ;; not context switch allowed here (let ((inactive-query (find-if (lambda (query) (not (query-active-p query))) queries)))