Skip to content

Conversation

staticlibs
Copy link
Collaborator

This is a backport of the PR #261 to v1.3-ossivalis stable branch.

This change fixes the problem when connection is left in inconsistent state when executeBatch throws constraint (or some other) error with auto-commit enabled.

In #213 executeBatch was changed to effectively disable auto-commit for the whole batch. In this case the rollback on error needs to be handled inside executeBatch too.

Testing: new tests added that cover constrain violation with executeBatch.

Fixes: #259

This is a backport of the PR duckdb#261 to `v1.3-ossivalis` stable branch.

This change fixes the problem when connection is left in inconsistent
state when `executeBatch` throws constraint (or some other) error with
auto-commit enabled.

In duckdb#213 `executeBatch` was changed to effectively disable auto-commit
for the whole batch. In this case the rollback on error needs to be
handled inside `executeBatch` too.

Testing: new tests added that cover constrain violation with
`executeBatch`.

Fixes: duckdb#259
@staticlibs staticlibs merged commit 5d0e36e into duckdb:v1.3-ossivalis Jun 16, 2025
@staticlibs staticlibs deleted the batch_autocommit_rollback_13 branch June 16, 2025 00:00
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.

1 participant