All work
DB option Always reset connection, does't work for JTDS driver
Description
Environment
Microsoft SQL Server 2014
Windows Server 2012
jTDS driver: 1.3.1
Attachments
relates to
Details
Details
Assignee
Reporter
Priority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Activity
Pothys - MitrahSoft 24 June 2022 at 14:47(edited)
I've checked this ticket with the lucee latest version 5.3.10.19-SNAPSHOT with enabled the datasource option Always reset connection to default values before use.
Yes, the jTDS driver end of every transaction didn't reset the isolation level to read committed.
I run the below code, I got the same result in both mssql and jTDS driver in lucee.
If I checked the SQL profiler data, for the mssql driver end of every transaction reset the isolation level to read committed. But for jTDS driver didn't reset the isolation level to read committed.
sql profiler data for mssql driver:
sql profiler data for jTDS driver:
Guardian 21 January 2021 at 13:45
Only if I change isolation level within the code Lucee, to another isolation level, only then it will change it to default
Guardian 21 January 2021 at 07:14(edited)
Can’t understand yet why, but when JTDS driver is used, our connection is not instanceof DatasourceConnectionImpl,
so because of that, in the DatasourceConnectionPool.java connection is not reset.
Guardian 4 January 2021 at 15:51
Using SQL Profiler, I found that:
“SET TRANSACTION ISOLATION LEVEL READ COMMITTED”
is executed only on:
creation connection in admin panel
verify connection from admin panel
Once, before the very first query.
Every following query will be executed as without resetting connection.
Even if I change isolation level by executing “SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED“.
Option that was added in https://luceeserver.atlassian.net/jira/software/c/projects/LDEV/issues/LDEV-2604
doesn't work with JTDS driver.