r5182: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 24 Jun 2003 01:12:57 +0000 (01:12 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 24 Jun 2003 01:12:57 +0000 (01:12 +0000)
db-mysql/mysql-api.lisp
db-mysql/mysql-sql.lisp

index c14cb7d0f2c5afe321d30370fc723b5de46bdd7c..b334ad0b9470227a88ee5c1a7c2910d29bf000d0 100644 (file)
@@ -8,7 +8,7 @@
 ;;;;                Original code by Pierre R. Mai 
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: mysql-api.lisp,v 1.3 2003/06/08 12:48:55 kevin Exp $
+;;;; $Id: mysql-api.lisp,v 1.4 2003/06/24 01:12:57 kevin Exp $
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
@@ -18,9 +18,6 @@
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(eval-when (:compile-toplevel)
-  (declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0))))
-
 (in-package #:mysql)
 
 ;;;; Modifications from original code
index eaea5d2aa8f004be9861ef6a714b404d0221ed78..0078d488aa703ab70bd3d8c294590c54cee53b03 100644 (file)
@@ -8,7 +8,7 @@
 ;;;;                Original code by Pierre R. Mai 
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: mysql-sql.lisp,v 1.6 2003/06/23 19:25:30 kevin Exp $
+;;;; $Id: mysql-sql.lisp,v 1.7 2003/06/24 01:12:57 kevin Exp $
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
@@ -43,6 +43,7 @@
 ;;; Field conversion functions
 
 (defun make-type-list-for-auto (num-fields res-ptr)
+  (declare (fixnum num-fields))
   (let ((new-types '())
        #+ignore (field-vec (mysql-fetch-fields res-ptr)))
     (dotimes (i num-fields)
     (nreverse new-types)))
 
 (defun canonicalize-types (types num-fields res-ptr)
-  (if (null types)
-      nil
-      (let ((auto-list (make-type-list-for-auto num-fields res-ptr)))
-       (cond
-         ((listp types)
-          (canonicalize-type-list types auto-list))
-         ((eq types :auto)
-          auto-list)
-         (t
-          nil)))))
+  (when types
+    (let ((auto-list (make-type-list-for-auto num-fields res-ptr)))
+      (cond
+       ((listp types)
+        (canonicalize-type-list types auto-list))
+       ((eq types :auto)
+        auto-list)
+       (t
+        nil)))))
 
 (defmethod database-initialize-database-type ((database-type (eql :mysql)))
   t)