[ 
https://issues.apache.org/jira/browse/TRAFODION-2145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Suresh Subbiah updated TRAFODION-2145:
--------------------------------------
    Assignee: Weiqing Xu

> Column name returned by SQLColumn api when column type is interval
> ------------------------------------------------------------------
>
>                 Key: TRAFODION-2145
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2145
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: connectivity-general
>    Affects Versions: 2.1-incubating
>         Environment: SW Build: apache-trafodion-build-2.1
> ODBC Driver: apache-trafodion-build-2.1
> Cluster Home Page:10.10.10.161:7180
>            Reporter: Jarek
>            Assignee: Weiqing Xu
>              Labels: build
>
> Description:
> when column type is interval, the column name is wrong using SQLColumn api.
> Test Steps:
> Step 1. Create henv, hdbc, hstmt handles.
> Step 2. Create the following table using the hstmt handle.
> _stprintf(&buffer[0], _T(" \
>             create table %s( \
>                 c0 largeint generated by default as identity, \
>                 c1 char(20) no default not null, \
>                 c2 int no default, \
>                 c3 smallint not null, \
>                 c4 float(52) default -1.7272337110188889e-76, \
>                 c5 double precision default -2.2250738585072014e-308 not 
> null, \
>                 c6 date default current_date, \
>                 c7 time(0) default current_time, \
>                 c8 decimal(18, 10) signed default 12345678.1234567890 not 
> null, \
>                 c9 largeint default 9.223E18, \
>                 c10 numeric(128, 0) signed default 
> 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
>  not null, \
>                 c11 real default -1.1579208e38, \
>                 c12 interval year(5) to month default NULL, \
>                 c13 pic xxxxxxxxxxxx display upshift default 'defaULT', \
>                 c14 character(8) default 'summer', \
>                 c15 varchar(10) default 'china', \
>                 c timestamp default current_timestamp, \
>                 primary key(c0)) \
>         "), tc001_table);
> Step 3. With the hstmt handle, check column name of column c12 using 
> SQLColumn api.
> In the Step 3. we expect the column name is C12, but it displays C11 in 
> actual result.
> the log output:
> 19:56:58  case begin.
> SQLColumns: SQLColumns function call executed correctly.
> Start to fetch column.
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C0, 
> datatype: -5, typename: BIGINT, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C1, 
> datatype: 1, typename: CHAR, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C2, 
> datatype: 4, typename: INTEGER, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C3, 
> datatype: 5, typename: SMALLINT, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C4, 
> datatype: 8, typename: DOUBLE PRECISION, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C5, 
> datatype: 8, typename: DOUBLE PRECISION, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C6, 
> datatype: 91, typename: DATE, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C7, 
> datatype: 92, typename: TIME, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C8, 
> datatype: 3, typename: DECIMAL, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C9, 
> datatype: -5, typename: BIGINT, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C10, 
> datatype: 2, typename: NUMERIC, nullable: 0, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C11, 
> datatype: 7, typename: REAL, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C11, 
> datatype: 6, typename: FLOAT, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C13, 
> datatype: 1, typename: CHAR, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C14, 
> datatype: 1, typename: CHAR, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C15, 
> datatype: 12, typename: VARCHAR, nullable: 1, remarks: .
> catalog: TRAFODION, schema: LOCSCH100, table: LOCTBL100, column: C, datatype: 
> 93, typename: TIMESTAMP, nullable: 1, remarks: .



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to