Skip to content

fix: preserve adapter transactions and simplify MySQL bulk loading - #741

Merged
cofin merged 9 commits into
mainfrom
fix/adapter-defect-remediation
Sep 11, 2026
Merged

fix: preserve adapter transactions and simplify MySQL bulk loading#741
cofin merged 9 commits into
mainfrom
fix/adapter-defect-remediation

Conversation

@cofin

@cofin cofin commented Sep 10, 2026

Copy link
Copy Markdown
Member

Psycopg sessions now pass body exceptions and cancellation to pooled connection cleanup, preserving rollback without forwarding unrelated outer exceptions. pymssql dictionary rows retain their mapping format.

MySQL adapters accept either local_infile=True or allow_local_infile=True and automatically use native bulk loading for eligible data. A separate feature opt-in is no longer required; an explicit false feature override retains executemany. Asyncmy supports buffered and unbuffered native loading with payload cleanup and failed-connection disposal, and requires asyncmy 0.2.13 or newer.

Validated with focused adapter and native MySQL tests, CI-equivalent typing, lint, and documentation builds. Bulk-ingestion examples and release notes document the simplified settings; Cockroach rollback regressions and the Spanner UUID overview complete the contract coverage.

@codecov-commenter

codecov-commenter commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.54098% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.22%. Comparing base (7ddfe41) to head (cd3a2bc).

Files with missing lines Patch % Lines
sqlspec/adapters/asyncmy/driver.py 91.66% 1 Missing and 1 partial ⚠️
sqlspec/adapters/asyncmy/_typing.py 98.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #741      +/-   ##
==========================================
+ Coverage   77.17%   77.22%   +0.05%     
==========================================
  Files         486      486              
  Lines       69772    69851      +79     
  Branches     9677     9685       +8     
==========================================
+ Hits        53847    53943      +96     
+ Misses      12473    12464       -9     
+ Partials     3452     3444       -8     
Flag Coverage Δ
integration 60.63% <85.24%> (+0.06%) ⬆️
py3.10 75.50% <97.54%> (+0.04%) ⬆️
py3.11 75.51% <97.54%> (+10.56%) ⬆️
py3.12 75.51% <97.54%> (+0.03%) ⬆️
py3.13 75.51% <97.54%> (+0.03%) ⬆️
py3.14 76.44% <97.50%> (+0.03%) ⬆️
unit 65.39% <95.90%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sqlspec/adapters/aiomysql/config.py 93.33% <100.00%> (-0.22%) ⬇️
sqlspec/adapters/asyncmy/config.py 90.45% <100.00%> (-0.15%) ⬇️
sqlspec/adapters/asyncmy/core.py 73.77% <100.00%> (+1.74%) ⬆️
sqlspec/adapters/mysqlconnector/config.py 93.28% <100.00%> (+0.07%) ⬆️
sqlspec/adapters/psycopg/_typing.py 93.75% <100.00%> (ø)
sqlspec/adapters/psycopg/config.py 89.97% <100.00%> (ø)
sqlspec/adapters/pymssql/core.py 72.85% <100.00%> (+0.39%) ⬆️
sqlspec/adapters/pymysql/config.py 94.14% <100.00%> (-0.10%) ⬇️
sqlspec/adapters/spanner/type_converter.py 75.18% <ø> (ø)
sqlspec/adapters/asyncmy/_typing.py 96.03% <98.00%> (+1.92%) ⬆️
... and 1 more

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cofin cofin changed the title fix: preserve psycopg session errors and pymssql dictionary rows fix: complete adapter transaction, row mapping, and native bulk loading fixes Sep 10, 2026
@cofin cofin changed the title fix: complete adapter transaction, row mapping, and native bulk loading fixes fix: preserve adapter transactions and simplify MySQL bulk loading Sep 10, 2026
@cofin
cofin merged commit a113b50 into main Sep 11, 2026
40 of 43 checks passed
@cofin
cofin deleted the fix/adapter-defect-remediation branch September 11, 2026 00:59
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