diff options
author | Adam Chlipala <adam@chlipala.net> | 2011-05-30 07:48:08 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2011-05-30 07:48:08 -0400 |
commit | 62abdfd0a23e35cbb1415ff48a0af3da9d702880 (patch) | |
tree | 5f109f795600afb68fac718401772c314afe3cbc | |
parent | 0932f8d0a699d270069816bbf1a367df68c2aeb5 (diff) |
Remember to remove explicit table projections in SQLite UPDATE SET values
-rw-r--r-- | src/monoize.sml | 9 | ||||
-rw-r--r-- | tests/t_t.ur | 3 | ||||
-rw-r--r-- | tests/t_t.urp | 5 |
3 files changed, 13 insertions, 4 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index 85b9a39e..25b608bb 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -1823,10 +1823,11 @@ fun monoExp (env, st, fm) (all as (e, loc)) = 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)]), diff --git a/tests/t_t.ur b/tests/t_t.ur new file mode 100644 index 00000000..9e38a30d --- /dev/null +++ b/tests/t_t.ur @@ -0,0 +1,3 @@ +table t : {A : int} + +task initialize = fn () => dml (UPDATE t SET A = A + 1 WHERE TRUE) diff --git a/tests/t_t.urp b/tests/t_t.urp new file mode 100644 index 00000000..12e96e39 --- /dev/null +++ b/tests/t_t.urp @@ -0,0 +1,5 @@ +dbms sqlite +database /tmp/test +sql t_t.sql + +t_t |