Jarek created TRAFODION-2145: -------------------------------- Summary: 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
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: _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); -- This message was sent by Atlassian JIRA (v6.3.4#6332)