-
Notifications
You must be signed in to change notification settings - Fork 426
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
Connection.getMetaData().getProcedures does not handle schema as a pattern #2336
Comments
Thanks for the repro taking a look. I'll get back to you. |
The repro is from a third party with a weird test. Let me know if you're having trouble running it (like I did) and I can provide something more straightforward. |
If you run test from intellij, you need this plugin: https://plugins.jetbrains.com/plugin/14080-kotest |
Thanks, if you can share that as well. |
Using |
Driver version
12.6.0.jre11
SQL Server version
2017-latest
Client Operating System
MacOS
JAVA/JVM version
openjdk version "17.0.10" 2024-01-16 LTS
Table schema
A full repro is available here:
https://github.com/ks-no/spring-jdbc-demo
Problem description
The Javadoc of
java.sql.DatabaseMetaData#getProcedures
states that the schema and procedureName parameters are pattern and not exact match, just like its sibblinggetFunctions
.Looking at
com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData
, those parameters seem to be handled as patterns using theescapeIDName
method. However the sames arguments forgetProcedures
are not.Expected behavior
Searching for a procedure using
some\_schema
should search for exactlysome_schema
(and not any character betweensome
andschema
).Actual behavior
If the pattern character is escaped using the escape character, the search does not succeed.
See also spring-projects/spring-framework#32295
The text was updated successfully, but these errors were encountered: