fixed bug converting to boolean in db-mysql/mysql-sql.lisp - from github user Sectoid
[clsql.git] / db-mysql / mysql-sql.lisp
index 0038da9cc364bad7a0959984521d5b78fcb446f0..eb965cada4f7a3033dfe5213a90ba46684995899 100644 (file)
                   (:boolean-ptr
                    (uffi:with-foreign-object (fo :byte)
                      (setf (uffi:deref-pointer fo :byte)
-                           (if (or (zerop value) (null value))
-                               0
-                               1))
+                           (case value
+                             ((nil 0) 0)
+                             (t 1)))
                      (mysql-options mysql-ptr option-code fo)))))))))))
 
 (defmethod database-connect (connection-spec (database-type (eql :mysql)))