changeset 1466:e2d7bd41f527

Remember to remove explicit table projections in SQLite UPDATE SET values
author Adam Chlipala <adam@chlipala.net>
date Mon, 30 May 2011 07:48:08 -0400
parents 2f5fd248588d
children 8fce85939259
files src/monoize.sml tests/t_t.ur tests/t_t.urp
diffstat 3 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/monoize.sml	Sun May 29 14:29:26 2011 -0400
+++ b/src/monoize.sml	Mon May 30 07:48:08 2011 -0400
@@ -1823,10 +1823,11 @@
                                                                 strcatComma (map (fn (x, _) =>
                                                                                      strcat [sc ("uw_" ^ x
                                                                                                  ^ " = "),
-                                                                                             (L'.EField
-                                                                                                  ((L'.ERel 2,
-                                                                                                    loc),
-                                                                                                   x), loc)])
+                                                                                             (L'.EFfiApp ("Basis", "unAs",
+                                                                                                          [(L'.EField
+                                                                                                                ((L'.ERel 2,
+                                                                                                                  loc),
+                                                                                                                 x), loc)]), loc)])
                                                                                  changed),
                                                                 sc " WHERE ",
                                                                 (L'.EFfiApp ("Basis", "unAs", [(L'.ERel 0, loc)]), loc)]),
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/t_t.ur	Mon May 30 07:48:08 2011 -0400
@@ -0,0 +1,3 @@
+table t : {A : int}
+
+task initialize = fn () => dml (UPDATE t SET A = A + 1 WHERE TRUE)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/t_t.urp	Mon May 30 07:48:08 2011 -0400
@@ -0,0 +1,5 @@
+dbms sqlite
+database /tmp/test
+sql t_t.sql
+
+t_t