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
Fix for bug 2711: Error when calling a procedure with parameters on DB2Z #2765
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review and test results:
Things to be aware of:
- Change is isolated to db2/z
- Change makes sense to me
- I can't test it but assume the submitter knows it's needed
Things to worry about:
@michaelmatthiaskern, hello! I've seen a couple of your PRs today and want to thank you for the very clear bug descriptions. Thanks!!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Fix addresses a bug when DB2Z changesets execute CALL statments using parameterized procedures.
- Fix is isolated to DB2Z.
- No additional testing required.
APPROVED
Environment
Liquibase Version: 4.8.0
Liquibase Integration & Version: CLI
Liquibase Extension(s) & Version: -
Database Vendor & Version: DB2Z 12
Operating System Type & Version: Windows 10 Pro
Pull Request Type
Description
We get an error when calling a procedure with parameters on DB2Z. Neither DB2LUW nor procedures without parameters are affected.
Steps To Reproduce
Create a procedure
and call the procedure
Actual Behavior
You will get the message
NO AUTHORIZED PROCEDURE NAMED TEST HAVING COMPATIBLE ARGUMENTS WAS FOUND. SQLCODE=-440, SQLSTATE=42884
Expected/Desired Behavior
The procedure should be called successfully.
Additional Context
This error is a DB2Z problem and also occurs also in other software, e.g. SQuirreL SQL Client, see https://sourceforge.net/p/squirrel-sql/bugs/1457/.
The issue seems to be due to an incomplete implementation of the JDBC driver or the DB2Z database. Instead of the Statement class the CallableStatement or the PreparedStatement class must be used, more details in the restrictions in https://www.ibm.com/docs/en/db2/11.5?topic=sql-calling-stored-procedures-in-jdbc-applications.
Fast Track PR Acceptance Checklist:
Need Help?
Come chat with us in the Liquibase Forum.