From: Russ Tyndall Date: Fri, 31 Jan 2014 01:43:42 +0000 (-0500) Subject: fixed bug causing some failing sqlite3 tests (database-identifiers are not string=) X-Git-Tag: v6.5.0~4 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=4b94edaad0182478a36da0d07282f100b9799804 fixed bug causing some failing sqlite3 tests (database-identifiers are not string=) --- diff --git a/ChangeLog b/ChangeLog index cc2b381..fad7f77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-01-30 Russ Tyndall + * sqlite3-sql.lisp, fddl.lisp Dont compare database-identifiers + with invalid comparison operators + 2014-01-30 Russ Tyndall * generic-odbc.lisp, ooddl.lisp, generic-postgresql.lisp, test-init.lisp, ds-nodes.lisp, generic-odbc.lisp, odbc-sql.lisp diff --git a/LATEST-TEST-RESULTS b/LATEST-TEST-RESULTS index 037aaa4..91103fb 100644 --- a/LATEST-TEST-RESULTS +++ b/LATEST-TEST-RESULTS @@ -20,10 +20,7 @@ increasing the number of failing tests :TIME/PG/FDML/USEC, :FDML/SELECT/36, :FDDL/CACHE-TABLE-QUERIES/1. :sqlite3 -9 out of 300 total tests failed: :FDDL/CACHE-TABLE-QUERIES/1, :FDDL/INDEX/3, - :FDDL/ATTRIBUTES/8, :FDDL/ATTRIBUTES/7, :FDDL/ATTRIBUTES/6, - :FDDL/ATTRIBUTES/5, :FDDL/ATTRIBUTES/4, :FDDL/ATTRIBUTES/3, - :FDDL/ATTRIBUTES/2. +1 out of 300 total tests failed: :FDDL/INDEX/3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/db-sqlite3/sqlite3-sql.lisp b/db-sqlite3/sqlite3-sql.lisp index d4b41e4..8ce592c 100644 --- a/db-sqlite3/sqlite3-sql.lisp +++ b/db-sqlite3/sqlite3-sql.lisp @@ -284,9 +284,10 @@ (database sqlite3-database) &key (owner nil)) (declare (ignore owner)) - + (loop for field-info in (sqlite3-table-info table database) - when (string= attribute (second field-info)) + when (string= (clsql-sys::unescaped-database-identifier attribute) + (second field-info)) return (let* ((raw-type (third field-info)) (start-length (position #\( raw-type)) diff --git a/sql/fddl.lisp b/sql/fddl.lisp index 39a2a0c..c4fc195 100644 --- a/sql/fddl.lisp +++ b/sql/fddl.lisp @@ -345,7 +345,8 @@ the fourth is the scale of the attribute and the fifth is 1 if the attribute accepts null values and otherwise 0." (with-slots (attribute-cache) database (let ((table-ident (database-identifier table database))) - (multiple-value-bind (val found) (gethash table-ident attribute-cache) + (multiple-value-bind (val found) + (gethash table attribute-cache) (if (and found (second val)) (second val) (let ((types (mapcar #'(lambda (attribute) @@ -361,10 +362,10 @@ the attribute accepts null values and otherwise 0." :owner owner)))) (cond ((and (not found) (eq t *cache-table-queries-default*)) - (setf (gethash table-ident attribute-cache) + (setf (gethash table attribute-cache) (list :unspecified types))) ((and found (eq t (first val)) - (setf (gethash table-ident attribute-cache) + (setf (gethash table attribute-cache) (list t types))))) types))))))