Bug #6741 SQL_ATTR_ROW_BIND_OFFSET_PTR is not supported
Submitted: 21 Nov 2004 19:38 Modified: 3 Aug 2007 12:13
Reporter: Farid Zidan
Status: Closed
Category:Connector/ODBC Severity:S2 (Serious)
Version:3.51.10 OS:Microsoft Windows (Windows 2k)
Assigned to: Jess Balint Target Version:

[21 Nov 2004 19:38] Farid Zidan
Description:
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 19:40] Farid Zidan
Make priority Hight because my application will not support MySQL without a fix for this
bug.
[15 Dec 2004 2:05] Harun Eren
Hi,

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. 

Regards.
[23 Dec 2004 21: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".

Bill
[15 Mar 2007 1: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 3: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 23:25] Jess Balint
Fix and test case

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

[27 Jul 2007 23: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.
[28 Jul 2007 0:11] Jess Balint
Fixes and updated test

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

[30 Jul 2007 21: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 12: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.