-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mssql-jdbc:12.6.0.jre11 - 'sp_getapplock' expects parameter '@LockMode' #2323
Comments
Can you collect trace logs from the driver? The error itself indicates that the application is simply missing a parameter when executing sp_getapplock against the server. However, the Flyway code you linked to clearly includes it. Logs will verify what is actually being passed to the driver. This could be a Flyway issue or a driver regression (a pretty bad one, if so). |
@driverpt I'm able to repro the issue. I'm still looking into it... What was the prior driver version that worked for you? |
I'm away from the computer now. But 12.3 or 12.4, can't recall exactly |
This is a regression because of changed logic on how the driver executes CallableStatements. But as of now, in 12.6.0, when calling stored procedures, the driver is expecting stored procedures to always be parameterized. So a workaround would be:
Otherwise I recommend remaining on 12.4 for now. I'm currently working on a fix for this. |
@tkyc, should we create a PR for Flyway to change the logic? Is this the new "standard" going forward? |
That shouldn't be necessary. This is a driver regression that we will make a fix for. We were actually surprised that there are no existing tests covering this type of query. We'll be adding tests for that, too, to ensure it's not regressed again in the future. |
@driverpt we will be releasing a hotfix release for this soon, thank you for alerting us. |
Driver version
Provide the JDBC driver version (e.g. 12.6.0.jre11).
SQL Server version
2017
Client Operating System
Docker
JAVA/JVM version
17
Table schema
N/A
Problem description
We're currently using Spring Boot w/ Flyway Migration (You can use TestContainers to debug the issue). We recently upgraded to 12.6.0-jre11 Driver and this caused Flyway to break.
The Query that Flyway uses seems to be fine, but probably something changed in the Driver Library that broke it.
Please check the link to the source code of the query.
Expected behavior
Flyway to execute
Actual behavior
Check Stack Trace
Error message/stack trace
Any other details that can be helpful
Source Code
Flyway Issue
JDBC trace logs
N/A
The text was updated successfully, but these errors were encountered: