diff src/monoize.sml @ 2264:bbcf9ba9b39a

Fix another mismatch between expunger SQL generation and SQL parser.
author Ziv Scully <ziv@mit.edu>
date Tue, 13 Oct 2015 20:24:37 -0400
parents f81f1930c5d6
children 985c8016b592
line wrap: on
line diff
--- a/src/monoize.sml	Tue Oct 13 14:22:05 2015 -0400
+++ b/src/monoize.sml	Tue Oct 13 20:24:37 2015 -0400
@@ -4371,16 +4371,19 @@
                                     [] => e
                                   | eb :: ebs =>
                                     (L'.ESeq (
-                                     (L'.EDml (foldl
-                                                   (fn (eb, s) =>
-                                                       (L'.EStrcat (s,
-                                                                    (L'.EStrcat (str " OR ",
-                                                                                 cond eb), loc)), loc))
-                                                   (L'.EStrcat (str ("DELETE FROM "
-                                                                     ^ Settings.mangleSql tab
-                                                                     ^ " WHERE "),
-                                                                cond eb), loc)
-                                                   ebs, L'.Error), loc),
+                                     (L'.EDml ((L'.EStrcat (str ("DELETE FROM "
+                                                                 ^ Settings.mangleSql tab
+                                                                 ^ " WHERE "),
+                                                            foldl (fn (eb, s) =>
+                                                                      (L'.EStrcat (str "(",
+                                                                       (L'.EStrcat (s,
+                                                                        (L'.EStrcat (str " OR ",
+                                                                         (L'.EStrcat (cond eb,
+                                                                                      str ")"),
+                                                                          loc)), loc)), loc)), loc))
+                                                                  (cond eb)
+                                                                  ebs), loc),
+                                      L'.Error), loc),
                                      e), loc)
                         in
                             e