From 886f2932114780f5d7961549ba606d4512d14d5c Mon Sep 17 00:00:00 2001 From: zxysilent Date: Thu, 5 Jan 2023 21:37:45 +0800 Subject: [PATCH] Fix auto rollback #1491 --- engine.go | 1 - engine_group.go | 1 - 2 files changed, 2 deletions(-) diff --git a/engine.go b/engine.go index a42519ee..24b279da 100644 --- a/engine.go +++ b/engine.go @@ -1395,7 +1395,6 @@ func (engine *Engine) tbNameWithSchema(v string) string { // Context creates a session with the context func (engine *Engine) Context(ctx context.Context) *Session { session := engine.NewSession() - session.isAutoClose = true return session.Context(ctx) } diff --git a/engine_group.go b/engine_group.go index f2fe913d..a3e41d08 100644 --- a/engine_group.go +++ b/engine_group.go @@ -82,7 +82,6 @@ func (eg *EngineGroup) Close() error { // Context returned a group session func (eg *EngineGroup) Context(ctx context.Context) *Session { sess := eg.NewSession() - sess.isAutoClose = true return sess.Context(ctx) }