-
Notifications
You must be signed in to change notification settings - Fork 428
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
[BUG] getColumns not escaping Wildcards #1136
Comments
Hi @Springrbua, thanks for contacting us. I've identified the issue and I'm testing my fix. As soon as the internal testings are done, I'll create a PR and provide you with a custom jar that contains my fix. |
Hi @Springrbua, @mprins, I've made a PR that fixes this issue. I've attached the driver jars with the fix in them (for Java 8/12), so if you have time, please try these and confirm if the fix is good. Thanks! |
@peterbae Thank you very much, the patched driver fixed the issue for me. |
When will MS release the build to customers? In other words, when will the successor to 7.4.1 be announced at https://techcommunity.microsoft.com/t5/SQL-Server/bg-p/SQLServer/label-name/SQLServerDrivers |
We're aiming to release the next preview version of the driver by the end of this month, and it will include this fix. |
I had a chance to test this today, I can not reproduce the problem with the attached, patched driver, even though I don't have columns with underscores, but do have tables with underscores, but that also seems to be adressed in #1138 |
#1138 merged. |
Driver version
Version 7.3.1 or later
SQL Server version
SQL Server 2017
Client Operating System
Windows 10 x64
JAVA/JVM version
OpenJDK 1.8.0_202
Problem description
Expected behaviour:
I have a table with a column
ID_Article
.When calling
getColumns
withID\_Article
ascol
Parameter, it should return the description of table columnID_Article
.Actual behaviour:
Since version 7.3.1 it does not seem to find the column anymore, as it does not escape the
_
correctly.Error message/stack trace:
No error is thrown, it just does not find the column.
Any other details that can be helpful:
The method
EscapeIDName
states, that\_n
will be mapped to'[_]n'
as the SQL-Server expects this syntax. However, this mapping does not seem to occur anymore.The bug was probably introduced by Fix | Align DatabaseMetadata.getColumns with JDBC 4.3 Specifications #1016.
Also [BUG] regression with 7.4.1 (against 7.2.2) #1134 might be related to this.
The text was updated successfully, but these errors were encountered: