r9509: * sql/ooddl.lisp: Commit patch from Edi Weitz fixing return
[clsql.git] / db-oracle / oracle-sql.lisp
index 8ef460229a203916744008f860aa007f7e5b4ed8..222e030c9b41881c05edfb5276d0327044a8a3f8 100644 (file)
@@ -395,7 +395,9 @@ the length of that format.")
                           (#.SQLT-FLT  
                            (uffi:deref-array b '(:array :double) irow))
                           (#.SQLT-INT  
-                           (uffi:deref-array b '(:array :int) irow))
+                           (ecase (cd-sizeof cd)
+                             (4
+                              (uffi:deref-array b '(:array :int) irow))))
                           (#.SQLT-DATE 
                            (deref-oci-string b irow (cd-sizeof cd))))))))
               (when (and (eq :string (cd-result-type cd))
@@ -625,11 +627,11 @@ the length of that format.")
                             (deref-vp errhp))
               (let ((*scale (uffi:deref-pointer scale :byte))
                     (*precision (uffi:deref-pointer precision :byte)))
-                
-                ;; (format t "scale=~d, precision=~d~%" *scale *precision)
+
+                ;;(format t "scale=~d, precision=~d~%" *scale *precision)
                 (cond
-                 ((or (and (zerop *scale) (not (zerop *precision)))
-                      (and (minusp *scale) (< *precision 10)))
+                 ((or (and (minusp *scale) (zerop *precision))
+                      (and (zerop *scale) (plusp *precision)))
                   (setf buffer (acquire-foreign-resource :int +n-buf-rows+)
                         sizeof 4                       ;; sizeof(int)
                         dtype #.SQLT-INT))