You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FIXED in 4.7.0] A statement that fails to serialize does not abort its transaction, so COMMIT succeeds without it #70
A query that fails before it reaches the server (a value that can't be serialized, a query that fails to build) is rejected on its own, and the connection sends a bare Sync (#20, 4.3.0). The server never sees an error, so the transaction carries on: a pipelined commit on a reserved connection, or a sql.begin() callback that doesn't await the failing statement, commits the other statements without it. A server-side error in the same place rolls the transaction back.
Decision needed: inside a transaction, a client-side failure should leave the transaction failed, so that COMMIT rolls back. Outside one, rejecting only the failing query stays.
changed the title [-]A statement that fails to serialize does not abort its transaction, so COMMIT succeeds without it[/-][+][FIXED in 4.7.0] A statement that fails to serialize does not abort its transaction, so COMMIT succeeds without it[/+]on Oct 24, 2026
Shipped in 4.7.0. A query that fails before it is sent now fails the transaction it is in, so COMMIT rolls back. Covered by the reserved-connection pipeline tests in tests/index.js (an undefined value, too many parameters, and a value whose serializer throws after describe, with prepare on and off), the savepoint test, and the sql.begin test where the failing query runs after the callback returned. On upstream 3.4.9 these reproduce porsager#1236 and porsager#1238.
Activity
fix: a query that fails before it is sent fails the transaction it is in
fix: a query that fails before it is sent fails the transaction it is in
test: a query that fails before it is sent must fail the transaction …
fix: a query that fails before it is sent fails the transaction it is in
test: a query that fails before it is sent must fail the transaction …
fix: a query that fails before it is sent fails the transaction it is in
fix: a query cancelled before it is sent fails the transaction it is in
fix: a query cancelled before it is sent fails the transaction it is in
docs: list upstream 1236 and 1238 among the fixed issues
docs: list upstream 1236 and 1238 among the fixed issues
chore: release 4.7.0
[-]A statement that fails to serialize does not abort its transaction, so COMMIT succeeds without it[/-][+][FIXED in 4.7.0] A statement that fails to serialize does not abort its transaction, so COMMIT succeeds without it[/+]okomarov commentedon Oct 24, 2026
Shipped in 4.7.0. A query that fails before it is sent now fails the transaction it is in, so
COMMITrolls back. Covered by the reserved-connection pipeline tests intests/index.js(an undefined value, too many parameters, and a value whose serializer throws after describe, with prepare on and off), the savepoint test, and thesql.begintest where the failing query runs after the callback returned. On upstream 3.4.9 these reproduce porsager#1236 and porsager#1238.