--- a/src/Pure/General/sql.scala Sun Jul 16 12:34:41 2023 +0200
+++ b/src/Pure/General/sql.scala Sun Jul 16 13:41:00 2023 +0200
@@ -455,10 +455,6 @@
finally { connection.setAutoCommit(auto_commit) }
}
- private var _transaction_count: Int = 0
- private def transaction_count(): Int =
- synchronized { _transaction_count += 1; _transaction_count }
-
def transaction_lock[A](
tables: Tables,
create: Boolean = false,
@@ -474,7 +470,7 @@
case s => error("Bad system property " + prop + ": " + quote(s))
}
- val trace_count = transaction_count()
+ val trace_count = - SQL.transaction_count()
val trace_start = Time.now()
var trace_nl = false
@@ -564,6 +560,9 @@
}
}
}
+
+
+ private val transaction_count = Counter.make()
}