added (*in-subselect* t) bindings around rendering out update/insert values
authorRuss Tyndall <russ@acceleration.net>
Wed, 25 Apr 2012 16:24:30 +0000 (12:24 -0400)
committerNathan Bird <nathan@acceleration.net>
Wed, 25 Apr 2012 17:03:13 +0000 (13:03 -0400)
ChangeLog
sql/expressions.lisp

index 677611e5c41a422b315e4bf9dc3d4f958937589e..891b8e66b98c8291f03fa8acb7c025bb717cf909 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,11 @@
        about the current state of thread-safety in clsql. This should be
        incorporated into the main docs at some point.
 
+2012-04-25  Russ Tyndall <russ@acceleration.net>
+       * sql/expressions.lisp (output-sql): on rendering update/insert
+       expression values, ensure that *in-subselect* is bound to T
+       so that the values will be correctly paren delimited
+
 2012-04-24  Nathan Bird  <nathan@acceleration.net>
 
        * sql/expressions.lisp (output-sql): on mysql CREATE TABLE
index 1479e67afa80d2edba6e5f4dc8d3bf339599640d..7071227a4b0964c1be2a6ec971fd30cdbec59c67 100644 (file)
@@ -813,7 +813,8 @@ uninclusive, and the args from that keyword to the end."
       (output-sql attributes database))
     (when values
       (write-string " VALUES " *sql-stream*)
-      (output-sql values database))
+      (let ((clsql-sys::*in-subselect* t))
+        (output-sql values database)))
     (when query
       (write-char #\Space *sql-stream*)
       (output-sql query database)))
@@ -870,7 +871,8 @@ uninclusive, and the args from that keyword to the end."
       (write-string "UPDATE " *sql-stream*)
       (output-sql table database)
       (write-string " SET " *sql-stream*)
-      (output-sql (apply #'vector (update-assignments)) database)
+      (let ((clsql-sys::*in-subselect* t))
+        (output-sql (apply #'vector (update-assignments)) database))
       (output-sql-where-clause where database)))
   t)