Skip to content

Keep the unsafe flag in Tx.Stmtx and Tx.StmtxContext (upstream #979). - #18

Merged
avgvi merged 3 commits into
masterfrom
fix/stmtx-unsafe
Oct 11, 2026
Merged

avgvi merged 3 commits into
masterfrom
fix/stmtx-unsafe

Conversation

@avgvi

@avgvi avgvi commented Oct 11, 2026

Copy link
Copy Markdown
Member

Merges upstream jmoiron/sqlx#979 by Gianmarco Fantinuoli with its original commit: Tx.Stmtx returned a safe statement from an unsafe transaction. A follow-up commit applies the same fix to Tx.StmtxContext, which the PR missed, and makes both keep the wrapped statement's own unsafe flag, so an unsafe statement inside a safe transaction stays unsafe. Adds a test for all of it.

Local run with Postgres 16, MySQL 8.4 and SQLite: 88 pass, 3 skip, 0 fail.

gfanto and others added 3 commits November 4, 2025 17:11
The `Tx` type can wrap a statement, the returned statement was missing
the `unsafe` flag.
@avgvi
avgvi merged commit 8df2213 into master Oct 11, 2026
6 checks passed
@avgvi
avgvi deleted the fix/stmtx-unsafe branch October 11, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants