You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Javadoc of java.sql.DatabaseMetaData#getProcedures states that the schema and procedureName parameters are pattern and not exact match, just like its sibbling getFunctions.
Looking at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData, those parameters seem to be handled as patterns using the escapeIDName method. However the sames arguments for getProcedures are not.
Expected behavior
Searching for a procedure using some\_schema should search for exactly some_schema (and not any character between some and schema).
Actual behavior
If the pattern character is escaped using the escape character, the search does not succeed.
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.
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.
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: