fixed bug causing some failing sqlite3 tests (database-identifiers are not string=)
authorRuss Tyndall <russ@acceleration.net>
Fri, 31 Jan 2014 01:43:42 +0000 (20:43 -0500)
committerRuss Tyndall <russ@acceleration.net>
Fri, 31 Jan 2014 01:47:16 +0000 (20:47 -0500)
ChangeLog
LATEST-TEST-RESULTS
db-sqlite3/sqlite3-sql.lisp
sql/fddl.lisp

index cc2b381be392e046d783175d9f727e20a3125331..fad7f77c3f50983e2b8ea74155a8f078bc8f29b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-01-30 Russ Tyndall <russ@acceleration.net>
+       * sqlite3-sql.lisp, fddl.lisp Dont compare database-identifiers
+       with invalid comparison operators
+
 2014-01-30 Russ Tyndall <russ@acceleration.net>
        * generic-odbc.lisp, ooddl.lisp, generic-postgresql.lisp,
        test-init.lisp, ds-nodes.lisp, generic-odbc.lisp, odbc-sql.lisp
index 037aaa44a778571a5e31362b65bad8a8901b8f99..91103fb51177d24570dd1822c910cfced4137882 100644 (file)
@@ -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.
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
index d4b41e4d8d6ea7344eb74be43c150c470ffc2d93..8ce592c6fbe1978f1e0d0ee824b33f4ae9ca05a3 100644 (file)
                                     (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))
index 39a2a0c44f4a038db77409a07adb1eeaed7c7fd0..c4fc1955a3e3a66c7ec76a98bde7db61a1978aed 100644 (file)
@@ -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))))))