Driver version
10.2.3 - 12.6.0
SQL Server version
2019
Client Operating System
Windows, Linux
JAVA/JVM version
1.8.0, 17
Table schema
Nothing special
Problem description
After a reconnect of an SQLServerConnection, various errors CAN happen when using previously prepared statements. These errors all come from executing or trying to execute a wrong statement on the database side.
Expected behavior
Previously prepared statements can still be used (reliably) after an automatic reconnect.
Actual behavior
Previously prepared statements MAY fail (details see below).
Error message/stack trace
n/a since it is not a single point of failure
Any other details that can be helpful
Steps to reproduce the problem:
- configure connectRetryCount > 0
- connect to the database
- prepare 2 statements a+b with different number of parameters
- execute them several times => a should have handle 1, b should have handle 2
- kill the tcp connection to the database
- execute statement b => an automatic reconnect should be triggered, statement works and gets a new handle 1 after handling "handle 2 not found" internally
- execute statement a => should try to use handle 1 and fail
JDBC trace logs
Provided in support case 2402210030004759
The case also contains an app to reproduce the problem
Driver version
10.2.3 - 12.6.0
SQL Server version
2019
Client Operating System
Windows, Linux
JAVA/JVM version
1.8.0, 17
Table schema
Nothing special
Problem description
After a reconnect of an SQLServerConnection, various errors CAN happen when using previously prepared statements. These errors all come from executing or trying to execute a wrong statement on the database side.
Expected behavior
Previously prepared statements can still be used (reliably) after an automatic reconnect.
Actual behavior
Previously prepared statements MAY fail (details see below).
Error message/stack trace
n/a since it is not a single point of failure
Any other details that can be helpful
Steps to reproduce the problem:
JDBC trace logs
Provided in support case 2402210030004759
The case also contains an app to reproduce the problem