Skip to content

Make unsupported savepoint operations fail consistently - #380

Merged
Giorgi merged 3 commits into
Giorgi:developfrom
pengdows:fix/savepoint-capability-contract
Oct 22, 2026
Merged

Giorgi merged 3 commits into
Giorgi:developfrom
pengdows:fix/savepoint-capability-contract

Conversation

@alaricd

@alaricd alaricd commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

DuckDB.NET reports DbTransaction.SupportsSavepoints == false, and Save/Rollback reject savepoint operations, but the inherited Release and ReleaseAsync methods complete successfully. This violates the DbTransaction.SupportsSavepoints capability contract.

This change explicitly keeps savepoints unsupported and makes synchronous and asynchronous Release reject the operation with NotSupportedException.

It also fixes AbortedTransactionTest, which began a transaction it never disposed. TransactionTests share one connection, so the next test to call BeginTransaction failed with "Already in a transaction." The new savepoint test was the first to run after it, which is why CI failed on the first commit.

Verification

  • Added SavepointsAreNotSupportedTest covering the capability flag and all sync/async savepoint methods.
  • Full DuckDB.NET.Test suite passes locally (net8.0): 7567 passed, 0 failed.
  • pengdows.AdoNetApiTest.conformance source-backed DuckDB profile passes: Required 119/119; ADO.NET, EF Core, and pengdows.crud certified.

Found by pengdows.AdoNetApiTest.conformance.

@Giorgi

Giorgi commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Tests are failing on all platforms

AbortedTransactionTest checked that BeginTransaction works after an
aborted commit, but never disposed the transaction it began. The class
fixture shares one connection, so the next test in the class to call
BeginTransaction failed with "Already in a transaction."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coveralls

coveralls commented Oct 21, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 39760727321

Coverage increased (+0.002%) to 92.792%

Details

  • Coverage increased (+0.002%) from the base build.
  • Patch coverage: 2 of 2 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4276
Covered Lines: 4034
Line Coverage: 94.34%
Relevant Branches: 2564
Covered Branches: 2313
Branch Coverage: 90.21%
Branches in Coverage %: Yes
Coverage Strength: 970630.78 hits per line

💛 - Coveralls

@alaricd

alaricd commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, fixed in 77bfadf. The new test wasn't the cause. AbortedTransactionTest began a transaction it never disposed, and since TransactionTests share one connection, the next test to call BeginTransaction failed with "Already in a transaction." The savepoint test happened to run next. That test now disposes its transaction, and the build passes on all three platforms.

Comment thread DuckDB.NET.Data/DuckDBTransaction.cs Outdated
@Giorgi
Giorgi merged commit 4240e4d into Giorgi:develop Oct 22, 2026
11 of 12 checks passed

This branch is waiting to be deployed

1 waiting deployment
external — c953e875 Waiting Oct 22, 2026 by alaricd via Authorize #710
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.

3 participants