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
If you have a catalog containing a - in the name (or other non alpha chars) and pass the catalog name to DatabaseMetadata.getSchema(String catalog, String schemaPattern), the method fails with a syntax exception as the catalog name is not escaped in the resulting query.
Expected behavior and actual behavior
I would expect the method to work with an unescaped catalog name as other metadata methods (e.g. getTables).
This is a good finding. Please feel free to create a PR in this repository for adding this change to driver.
We appreciate and welcome contributions from the community.
We would like to review and merge this change in upcoming releases.
Driver version or jar name
6.5.4-SNAPSHOT
(15a01c9)SQL Server version
microsoft/mssql-server-linux:2017-latest
Client operating system
OS X Sierra
Java/JVM version
Oracle 10.0.1
Table schema
None.
Problem description
If you have a catalog containing a
-
in the name (or other non alpha chars) and pass the catalog name toDatabaseMetadata.getSchema(String catalog, String schemaPattern)
, the method fails with a syntax exception as the catalog name is not escaped in the resulting query.Expected behavior and actual behavior
I would expect the method to work with an unescaped catalog name as other metadata methods (e.g.
getTables
).Repro code
See tests in fabiocorneti#1 .
The text was updated successfully, but these errors were encountered: