From d428d4e48f555b3b90fcedd87a5894a96daf1c58 Mon Sep 17 00:00:00 2001 From: HAYAMA Kaoru <3752189+hymkor@users.noreply.github.com> Date: Wed, 12 Nov 2025 01:24:34 +0900 Subject: [PATCH 1/2] Enable `SET` to execute within a transaction. --- loop.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/loop.go b/loop.go index eb5bd2a..41cf921 100644 --- a/loop.go +++ b/loop.go @@ -172,7 +172,9 @@ func (ss *session) Loop(ctx context.Context, commandIn commandIn) error { } else { err = ErrInvalidRollback } - case "SAVEPOINT", "SAVE", "RELEASE": + + // Executable but return nothing, safe in transaction + case "SAVEPOINT", "SAVE", "RELEASE", "SET": misc.Echo(ss.spool, query) err = doTCL(ctx, ss, query) From a48e65e5478651fcb4ca8fd087698fba3688ce21 Mon Sep 17 00:00:00 2001 From: HAYAMA Kaoru <3752189+hymkor@users.noreply.github.com> Date: Wed, 12 Nov 2025 02:32:47 +0900 Subject: [PATCH 2/2] Release notes: mentioned to #21 (`SET`) --- release_note_en.md | 2 +- release_note_ja.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release_note_en.md b/release_note_en.md index b866c67..4dfb323 100644 --- a/release_note_en.md +++ b/release_note_en.md @@ -6,7 +6,7 @@ ### Specification Changes -- Enable `RELEASE SAVEPOINT`(#19) and `REPLACE INTO`(#20,MySQL) to execute within a transaction. +- Enable `RELEASE SAVEPOINT`(#19), `REPLACE INTO`(#20,MySQL) and `SET`(#21) to execute within a transaction. v0.26.0 ======= diff --git a/release_note_ja.md b/release_note_ja.md index a2c5fae..dac6fc8 100644 --- a/release_note_ja.md +++ b/release_note_ja.md @@ -6,7 +6,7 @@ ### 仕様変更 -- `RELEASE SAVEPOINT` (#19), `REPLACE INTO` (#20,MySQL) もトランザクション内で実行できるようにした。 +- `RELEASE SAVEPOINT` (#19), `REPLACE INTO` (#20,MySQL), `SET`(#21) もトランザクション内で実行できるようにした。 v0.26.0 =======