Bug #6741 SQL_ATTR_ROW_BIND_OFFSET_PTR is not supported
Submitted: 21 Nov 2004 18:38 Modified: 3 Aug 2007 10:13
Reporter: Farid Zidan Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.10 OS:Microsoft Windows (Windows 2k)
Assigned to: Jess Balint CPU Architecture:Any

[21 Nov 2004 18:38] Farid Zidan
SQLTables, SQLColumns, and possibly SQLPrimaryKeys resultsets do not suport row bind offsets.  

How to repeat:
Set the statement attribute to use row bind offset SQL_ATTR_ROW_BIND_OFFSET_PTR
execute the statement and fetch the resultset. Regardless of the row bind offset pointer value the fetched row is always retrieved into the first row of the resultset buffer

Suggested fix:
Add the value at the offset bind pointer to the bound column data location if the offset bind pointer value is not zero
[21 Nov 2004 18:40] Farid Zidan
Make priority Hight because my application will not support MySQL without a fix for this bug.
[15 Dec 2004 1:05] Harun Eren

Thank you for your bug report. 

Yes, it is true, the Connector/ODBC 3.51 does not supporting the row bind offset 
attribute SQL_ATTR_ROW_BIND_OFFSET_PTR pointer. 

[23 Dec 2004 20:53] [ name withheld ]
Does that no catalog option possibly interact with this?  I have a long-standing Smalltalk system that abruptly started having problems calling SqlTables(), and I stumbled on to the fact that catalogs might be involved, and found that checking the experimental option worked around the problem.

I reported more detail on the win32 list on 12/8/04 under the subject "Catalog problems; windows installer woes".

[15 Mar 2007 0:00] Jim Winstead
This is not unique to the catalog functions at all, it is simply not completely supported. (We accept a value, but never use it.)
[12 Jun 2007 1:24] Jim Winstead
We do support SQL_ATTR_ROW_BIND_OFFSET_PTR now, we just need to add tests to make sure it works with the catalog functions. Support (or at least partial support) was added in 3.51.15.
[27 Jul 2007 21:25] Jess Balint
Fix and test case

Attachment: bug6741.diff (application/octet-stream, text), 3.20 KiB.

[27 Jul 2007 21:39] Jim Winstead
patch is okay, but we need to handle the offset as a SQLLEN instead of SQLINTEGER, and the test needs to check that pcb_offset is being handled correctly.
[27 Jul 2007 22:11] Jess Balint
Fixes and updated test

Attachment: bug6741.diff (application/octet-stream, text), 4.39 KiB.

[30 Jul 2007 19:38] Jess Balint
Committed in svn rev 614.
  * Added support for SQL_ATTR_ROW_BIND_OFFSET_PTR in normal cursors.
Will be released in version 3.51.18.
[3 Aug 2007 10:13] MC Brown
A note has been added to the 3.51.18 changelog: 

The SQL_ATTR_ROW_BIND_OFFSET_PTR is now supported for row bind offsets.