From 905f7c3e1286fdae40f1600177b3a471230f0a75 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Mon, 27 Apr 2020 17:52:11 -0700 Subject: [PATCH] Addresses #106 by adding experimental locking in this case --- CHANGELOG.md | 5 +++++ src/next/jdbc/transaction.clj | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbf83d5..05b7a87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ Only accretive/fixative changes will be made from now on. +The following changes have been made on **master** since the 1.0.424 release: + +* Add MySQL-specific result set streaming tip. +* Investigate possible solutions for #106 (mutable transaction thread safety) -- experimental `locking` on `Connection` object. + ## Stable Builds * 2020-04-10 -- 1.0.424 diff --git a/src/next/jdbc/transaction.clj b/src/next/jdbc/transaction.clj index a92ac6c..e538149 100644 --- a/src/next/jdbc/transaction.clj +++ b/src/next/jdbc/transaction.clj @@ -82,7 +82,8 @@ (extend-protocol p/Transactable java.sql.Connection (-transact [this body-fn opts] - (transact* this body-fn opts)) + (locking this + (transact* this body-fn opts))) javax.sql.DataSource (-transact [this body-fn opts] (with-open [con (p/get-connection this opts)]