[elephant-devel] Possible bug in sql-controller.lisp

Andrew Kirkpatrick spacebat at ubermonkey.net
Mon Jan 25 22:18:23 UTC 2010


Hi,

I'm trying to get elephant working with sqlite on sbcl, and I'm using 
clbuild to retrieve and set up systems. However, evaluating the 
following form led to an error:

(defvar *elephant-store*
   (open-store '(:clsql (:sqlite3 "/tmp/test.db"))))

The error was:

Execution of a form compiled with errors.
Form:
   (HANDLER-CASE (QUERY select count(*) from keyvalue)
               ((SQL-DATABASE-ERROR NIL NIL)))
Compile-time error:
   (in macroexpansion of (HANDLER-CASE (CLSQL-SYS:QUERY "select count(*) 
from keyvalue") ((CLSQL-SYS:SQL-DATABASE-ERROR NIL NIL))))
(hint: For more precise location, try *BREAK-ON-SIGNALS*.)
error while parsing arguments to DESTRUCTURING-BIND:
   invalid number of elements in
     ((CLSQL-SYS:SQL-DATABASE-ERROR NIL NIL))
   to satisfy lambda list
     (TYPE SB-IMPL::LL &BODY SB-IMPL::BODY):
   at least 2 expected, but 1 found
[Condition of type SB-INT:COMPILED-PROGRAM-ERROR]

Looking at the source, it appears there was an extra set of parentheses 
around SQL-DATABASE-ERROR () NIL on sql-controller.lisp line 301. I 
removed one set of parens, deleted the corresponding fasl and 
subsequently the form evaluated without error.

Then trying to use the store I ran into another problem that smells of 
FFI, but that's for another post.

Cheers,
--
Andrew Kirkpatrick

"The first rule of Perl Club... has subscript 0.
  Unless you changed $[.
  But don't!"

-- blazar on perlmonks.org




More information about the elephant-devel mailing list