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 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.
See also spring-projects/spring-framework#32295
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#getProceduresstates 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 theescapeIDNamemethod. However the sames arguments forgetProceduresare not.Expected behavior
Searching for a procedure using
some\_schemashould search for exactlysome_schema(and not any character betweensomeandschema).Actual behavior
If the pattern character is escaped using the escape character, the search does not succeed.
See also spring-projects/spring-framework#32295