Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: close conn (#8153)

p0ny277558fd444b
diff --git a/backend/plugin/db/mysql/mysql.go b/backend/plugin/db/mysql/mysql.go
index 97928484d8..9d58b92cc4 100644
--- a/backend/plugin/db/mysql/mysql.go
+++ b/backend/plugin/db/mysql/mysql.go
@@ -164,6 +164,7 @@ func (driver *Driver) Execute(ctx context.Context, statement string, _ bool, opt
if err != nil {
return 0, err
}
+ defer conn.Close()
if opts.BeginFunc != nil {
if err := opts.BeginFunc(ctx, conn); err != nil {