5.0.5 patches
"Walter C. Pelissero" <[email protected]>
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Message-ID | <[email protected]> |
AFAICT there are a couple of issues in CLSQL 5.0.5.
Here are some patches I had to apply to mend them.
The first two are typos, of which the first is a bug. The third is to
avoid that SBCL would signal an error when null are found in columns.
The fourth avoids a SEGV when converting strings. I'm not quite sure
whether the last bug might not actually be UFFI's.
Hope this helps.
diff -ur clsql-5.0.5/db-postgresql/postgresql-sql.lisp /usr/home/wcp/lisp/clsql-5.0.5/db-postgresql/postgresql-sql.lisp
--- clsql-5.0.5/db-postgresql/postgresql-sql.lisp 2010-02-11 21:59:14.000000000 +0100
+++ /usr/home/wcp/lisp/clsql-5.0.5/db-postgresql/postgresql-sql.lisp 2010-04-12 16:58:21.000000000 +0200
@@ -210,7 +210,7 @@
:database database
:expression sql-expression
:message (tidy-error-message (PQerrorMessage conn-ptr)
- (encoding databse))))
+ (encoding database))))
(unwind-protect
(case (PQresultStatus result)
(#.pgsql-exec-status-type#command-ok
diff -ur clsql-5.0.5/sql/fddl.lisp /usr/home/wcp/lisp/clsql-5.0.5/sql/fddl.lisp
--- clsql-5.0.5/sql/fddl.lisp 2010-02-11 21:59:14.000000000 +0100
+++ /usr/home/wcp/lisp/clsql-5.0.5/sql/fddl.lisp 2010-04-12 17:07:39.000000000 +0200
@@ -431,7 +431,7 @@
(defun set-sequence-position (name position &key (database *default-database*))
"Explicitly set the the position of the sequence called NAME in
-DATABASE, which defaults to *DEFAULT-DATABSE*, to POSITION which
+DATABASE, which defaults to *DEFAULT-DATABASE*, to POSITION which
is returned."
(database-set-sequence-position (database-identifier name database)
position database))
diff -ur clsql-5.0.5/sql/metaclasses.lisp /usr/home/wcp/lisp/clsql-5.0.5/sql/metaclasses.lisp
--- clsql-5.0.5/sql/metaclasses.lisp 2010-02-11 21:59:14.000000000 +0100
+++ /usr/home/wcp/lisp/clsql-5.0.5/sql/metaclasses.lisp 2010-04-12 17:43:33.000000000 +0200
@@ -526,6 +526,11 @@
(setf (specified-type esd)
(delistify-dsd (specified-type dsd)))
+ ;; The type-check-function is computed at defclass expansion,
+ ;; which is too early for the CLSQL type conversion to take
+ ;; place. This gets rid of it. It's ugly but it's better
+ ;; than nothing -wcp10/4/10.
+ #+sbcl (setf (slot-value esd 'sb-pcl::%type-check-function) nil)
)
;; all other slots
diff -ur clsql-5.0.5/uffi/clsql-uffi.lisp /usr/home/wcp/lisp/clsql-5.0.5/uffi/clsql-uffi.lisp
--- clsql-5.0.5/uffi/clsql-uffi.lisp 2010-02-11 21:59:14.000000000 +0100
+++ /usr/home/wcp/lisp/clsql-5.0.5/uffi/clsql-uffi.lisp 2010-04-12 16:44:19.000000000 +0200
@@ -139,6 +139,6 @@
(error "Can't return blob since length is not specified.")))
(t
(uffi:convert-from-foreign-string char-ptr
- :null-terminated-p nil
+ :null-terminated-p (not length)
:length length
:encoding encoding))))))
--
walter pelissero
http://www.pelissero.de