Skip to content

ddbc 0.16.1

Latest

Choose a tag to compare

@buggins buggins released this 28 Nov 22:46
· 2 commits to master since this release
a78fbdd

Patch release with two driver fixes found during the deadlock and cancel audit follow-ups (#250). No API changes.

"dependencies": { "ddbc": "~>0.16.1" }

Fixes

  • Errors pass through the drivers (#269, PR #272).
    • The MySQL, ODBC and SQLite drivers caught Throwable in 54 places and rethrew it as an SQLException. An Error from a client library, such as a failed assert, then looked like an ordinary database error, and the possibly broken connection stayed in use or went back to a pool.
    • Errors now reach the caller unchanged, and every exception is handled as before.
    • After an Error, close the connection instead of returning it to a pool (README, "Errors").
  • Drivers register once per process (#269).
    • Every driver registered itself in a __gshared static this(), which, like static this(), runs in every new thread. Each thread re-registered all drivers into the unlocked driver map while other threads could be reading it.
    • Drivers now register in shared static this(), DriverFactory guards its map with a lock, and the PGSQL driver loads libpq once under a lock.
    • DriverFactory.registerDriverFactory may be called from any thread.

Behaviour change

  • MySQL JSON columns in debug builds. mysql-native 3.1, which ddbc uses, asserts on JSON columns (mysql-d/mysql-native#285).
    • That assert used to arrive as SQLNonTransientConnectionException: Unsupported SQL type 245. Now the AssertError reaches the caller.
    • A -release build already halted there, since mysql-native's assert(false) stops the program.
    • The fix is in mysql-native upstream (#286), but not in a release yet. ddbc will move to it once it's released.

Also

  • AGENTS.md: guidance for AI coding agents and a quick reference for contributors (#267, #270).

Full changelog: v0.16.0...v0.16.1

🤖 Generated with Claude Code