diff --git a/loop.go b/loop.go index e819c3a..eb5bd2a 100644 --- a/loop.go +++ b/loop.go @@ -175,7 +175,9 @@ func (ss *session) Loop(ctx context.Context, commandIn commandIn) error { case "SAVEPOINT", "SAVE", "RELEASE": misc.Echo(ss.spool, query) err = doTCL(ctx, ss, query) - case "DELETE", "INSERT", "UPDATE", "MERGE": + + // Updates returning affected row count, safe in transaction + case "DELETE", "INSERT", "UPDATE", "MERGE", "REPLACE": misc.Echo(ss.spool, query) isNewTx := (ss.tx == nil) err = ss.beginTx(ctx, ss.stdErr) diff --git a/release_note_en.md b/release_note_en.md index df9b253..b866c67 100644 --- a/release_note_en.md +++ b/release_note_en.md @@ -6,7 +6,7 @@ ### Specification Changes -- Enable `RELEASE SAVEPOINT` to execute within a transaction. (#19) +- Enable `RELEASE SAVEPOINT`(#19) and `REPLACE INTO`(#20,MySQL) to execute within a transaction. v0.26.0 ======= diff --git a/release_note_ja.md b/release_note_ja.md index f8e06b8..a2c5fae 100644 --- a/release_note_ja.md +++ b/release_note_ja.md @@ -6,7 +6,7 @@ ### 仕様変更 -- `RELEASE SAVEPOINT` もトランザクション内で実行できるようにした。(#19) +- `RELEASE SAVEPOINT` (#19), `REPLACE INTO` (#20,MySQL) もトランザクション内で実行できるようにした。 v0.26.0 =======