Skip to content

[BUG] getColumns not escaping Wildcards #1136

@probert94

Description

@probert94

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

  1. Expected behaviour:
    I have a table with a column ID_Article.
    When calling getColumns with ID\_Article as col Parameter, it should return the description of table column ID_Article .

  2. Actual behaviour:
    Since version 7.3.1 it does not seem to find the column anymore, as it does not escape the _ correctly.

  3. Error message/stack trace:
    No error is thrown, it just does not find the column.

  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in the driver. A high priority item that one can expect to be addressed quickly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions