Problems selecting from a MYSQL database
Nicolas Neuss <[email protected]>
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Organization | University Karlsruhe |
| Message-ID | <[email protected]> |
Hello,
connecting to a MYSQL database with SBCL/CLSQL (on both Debian/stable
and Debian/testing) I have some problems:
1. I did not succed with enabling lower case as default, i.e. doing
(with-gamm-db-connection
(select [surname] :from [users]))
I get the error:
While accessing database #<MYSQL-DATABASE ...>
with expression "SELECT SURNAME FROM USERS":
Error 1146 / Table 'af20_gamm2010.USERS' doesn't exist
has occurred.
[Condition of type SQL-DATABASE-DATA-ERROR]
2. If I work around this by doing
(with-gamm-db-connection
(select [|surname|] :from [|users|]))
I obtain the error:
c-string decoding error (:external-format :UTF-8):
the octet sequence 4 cannot be decoded.
[Condition of type SB-INT:C-STRING-DECODING-ERROR]
Restarts:
0: [RETRY] Retry SLIME interactive evaluation request.
1: [ABORT] Return to SLIME's top level.
2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "worker" RUNNING {100425BC91}>)
Backtrace:
0: (SB-INT:C-STRING-DECODING-ERROR :UTF-8 4)
1: (SB-IMPL::READ-FROM-C-STRING/UTF-8 #.(SB-SYS:INT-SAP #X0094BBF1) CHARACTER)
2: (UFFI::SBCL-NATURALIZE-CSTRING #<unavailable argument>)[:EXTERNAL]
3: ((SB-PCL::FAST-METHOD DATABASE-QUERY (T CLSQL-MYSQL:MYSQL-DATABASE T T)) #<unavailable lambda list>)
Can someone help me with this?
Thank you very much.
Nicolas