Issue with doing cross delete using clsql

Mackram Raydan <[email protected]> Fri, 15 Oct 2010 17:24:26 +0300
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
  Hey everyone,

I wanted to check if anyone has faced/is facing an issue with a delete 
across tables. I am noticing the following errors:

1- If I attempt to use the clsql-sys:delete-records function I am unable 
to do so since the expansion is not proper. By that I mean the following: /
     (clsql-sys:delete-records :from `([tablea] [tableb]) :where [= 
[tablea id] [tableb id]]) /you would get a mysql syntax error basically 
cause this would be translated to the query /DELETE FROM (TABLEA, 
TABLEB) WHERE TABLEA.id = TABLEB.id;/ which is incorrect. The proper 
syntax should have been /DELETE TABLEA, TABLEB FROM (TABLEA, TABLEB) 
WHERE TABLEA.id = TABLEB.id; /according to the sql syntax (I am using 
mysql to be specific).

2- If I attempt to use the clsql-sys:query function to simply execute 
the proper memory string I get an unhandled memory fault. Below is the 
actual debug dump:

        /Unhandled memory fault at #x48./
        /   [Condition of type SB-SYS:MEMORY-FAULT-ERROR]/

        /Restarts:/
        / 0: [RETRY] Retry SLIME REPL evaluation request./
        / 1: [*ABORT] Return to SLIME's top level./
        / 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD
        "repl-thread" RUNNING {B78FFB9}>)/

        /Backtrace:/
        /  0: (SB-SYS:MEMORY-FAULT-ERROR)/
        /  1: ("foreign function: #x806721B")/
        /  2: ("foreign function: #x8067550")/
        /  3: ("foreign function: #xB73FC3F7")/
        /  4: ((SB-PCL::FAST-METHOD CLSQL-SYS:DATABASE-QUERY (T
        CLSQL-MYSQL:MYSQL-DATABASE T T)) #<unavailable lambda list>)/
        /  5: ((SB-PCL::FAST-METHOD CLSQL-SYS:DATABASE-QUERY (T
        CLSQL-MYSQL:MYSQL-DATABASE T T)) #<unavailable lambda
        list>)[:EXTERNAL]/
        /  6: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL.
        SB-PCL::.ARG0. SB-PCL::.ARG1. SB-PCL::.ARG2. SB-PCL::.ARG3.)) ..)/
        /  7: ((SB-PCL::FAST-METHOD CLSQL-SYS:QUERY (STRING))
        ..)[:EXTERNAL]/
        /  8: (SB-INT:SIMPLE-EVAL-IN-LEXENV ..)/

By the way I am running SBCL 1.0.29 on a Linux machine.

If anyone can point some light onto this I would be much appreciated.

Thanks,

Mackram Raydan

_______________________________________________
CLSQL mailing list
[email protected]
http://lists.b9.com/cgi-bin/mailman/listinfo/clsql