aboutsummaryrefslogtreecommitdiff
path: root/funcs.go
diff options
context:
space:
mode:
Diffstat (limited to 'funcs.go')
-rw-r--r--funcs.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/funcs.go b/funcs.go
index ceb162b..b13a917 100644
--- a/funcs.go
+++ b/funcs.go
@@ -105,8 +105,14 @@ func Select(fns ...Operation) Operation {
case 1:
return fns[0](tx)
default:
+ oldWrites := tx.writes
+ tx.writes = make(map[*Var]interface{}, len(oldWrites))
+ for k, v := range oldWrites {
+ tx.writes[k] = v
+ }
ret, retry := catchRetry(fns[0], tx)
if retry {
+ tx.writes = oldWrites
return Select(fns[1:]...)(tx)
} else {
return ret