ODBC API SQLSetDescField test fails, descriptor field SQL_DESC_LABEL not getting set

Bug #1324690 reported by Aruna Sadashiva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Won't Fix
Medium
RuoYu Zuo

Bug Description

Coast SQLSet/GetDescFields (3.0) test that gets SQL_DESC_LABEL fails, getting column name instead.
 =======================================================================
 06:20:25 IRD: SQL_DESC_LABEL
 ***ERROR: Expected Label Project/Code and got JAAFUO4BQV, line 3201

information type: Proprietary → Public
Revision history for this message
RuoYu Zuo (ruo-yu-zuo) wrote :

This is a know issue since Seaquest time, such kind of descriptor field of IRD requires supports of SQL, this describing field is not allowed to be set by application, it is set while the table is created.

Changed in trafodion:
assignee: nobody → RuoYu Zuo (ruo-yu-zuo)
milestone: none → r1.1
Changed in trafodion:
milestone: r1.1 → none
Changed in trafodion:
milestone: none → r2.0
Revision history for this message
RuoYu Zuo (ruo-yu-zuo) wrote :

After discussion, we decide not to fix this for returning column name also comply with the ODBC standard.

==================================================================================

From: Sundaresan, Sandhya
Sent: Friday, May 08, 2015 1:02 PM
To: Zuo, Ruo-Yu (RuoYu, HPIT-GADSC); Fan, Chen-Yun (Magic)
Cc: Hegde, Anuradha
Subject: RE: About bug#1324690

Agreed Ruo Yu. Returning column name seems to be the right thing and we do not have a concept of aliases or column labels.
I think we should close after Ruo Yu adds these details in the LP.

Thanks
Sandhya

From: Zuo, Ruo-Yu (RuoYu, HPIT-GADSC)
Sent: Thursday, May 07, 2015 8:24 PM
To: Fan, Chen-Yun (Magic); Sundaresan, Sandhya
Cc: Hegde, Anuradha
Subject: RE: About bug#1324690

IRD is concept of row descriptor in ODBC represents how rows are implemented in actual database(means in sql), including how many columns, and column names, types, precision, etc. This descriptor is created and filled in ODBC driver when Prepare is done by sql with returned values in output descriptor of SQLDESC_ITEM.

This bug is about failed of retrieving Column Label, and Column Label is not application defined property, it’s like an alias of a column or actual name used by SQL? or something else?
Anyway, it’s a read only attribute stored only in IRD, as ODBC standard describes. But now, when Prepare done, there’s no such kind of thing in returned output descriptor from SQL indicates the Label value, thus driver returns the column name instead.

However, actually when scrutinize into the latest ODBC standard spec, it has comments like below:
SQL_DESC_LABEL [IRDs]
This read-only SQLCHAR * record field contains the column label or title. If the column does not have a label, this variable contains the column name. If the column is unnamed and unlabeled, this variable contains an empty string.
So, it means returning column name is correct behavior if there is no label. I think we don’t need to be tangled with this anymore. For me, label does not seem to be any practical usage.

I think my comments may implied we may close the bug at the first place, I don’t exactly remember, sorry for did not explicit say it because I was not sure who’d be proper to decide this.

Thanks& Regards
RuoYu

From: Fan, Chen-Yun (Magic)
Sent: Thursday, May 07, 2015 2:19 PM
To: Sundaresan, Sandhya; Zuo, Ruo-Yu (RuoYu, HPIT-GADSC)
Cc: Hegde, Anuradha
Subject: RE: About bug#1324690

Ruoyu, can you explain more for it? Thanks.

Regards,
Magic

From: Sundaresan, Sandhya
Sent: 2015年5月7日 13:55
To: Fan, Chen-Yun (Magic)
Cc: Zuo, Ruo-Yu (RuoYu, HPIT-GADSC); Hegde, Anuradha
Subject: RE: About bug#1324690

Hi Magic,
Looking at the few lines of comments and symptoms in the LP , I don’t understand what is needed. Not sure what IRD means. What needs to be set and where does it need to be set when the table is created ?
Thanks
Sandhya

Changed in trafodion:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.