Skip to content

[BUG] DatabaseMetaData.getColumns(...) IS_GENERATEDCOLUMN value icorrect #1013

@george-walker

Description

@george-walker

Driver version

7.2.1.jre8

SQL Server version

Azure SQL

Client Operating System

Ubuntu 18.04

JAVA/JVM version

openjdk full version "1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12"

Table schema

CREATE TABLE product_list (
  id int auto_increment primary key,
  name NVARCHAR(100) NOT NULL,
  category NVARCHAR(50),
  business_unit NVARCHAR(50),
  quantity INTEGER,
  price FLOAT,
  realname NVARCHAR AS concat( business_unit, ':', name )
)

Problem description

  1. Expected behaviour:

https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)

The column IS_GENERATEDCOLUMN should return "YES" or "NO" as per JDBC

In the DDL above the column realname is a computed column

  1. Actual behaviour:

The column IS_GENERATEDCOLUMN return "1" or "0"

  1. Error message/stack trace:
  2. Any other details that can be helpful:

Metadata

Metadata

Assignees

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