Bug #60818 SQLGetData returning wrong value in StrLen_or_IndPtr parameter
| Submitted: | 9 Apr 2011 17:34 | Modified: | 28 May 2013 13:16 |
|---|---|---|---|
| Reporter: | Edward Boggis-Rolfe | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / ODBC | Severity: | S1 (Critical) |
| Version: | 5.01.08.00 | OS: | Windows (7) |
| Assigned to: | Bogdan Degtyariov | CPU Architecture: | Any |
| Tags: | SQLGetData StrLen_or_IndPtr wrong | ||
[9 Apr 2011 17:34]
Edward Boggis-Rolfe
[9 Apr 2011 17:36]
Edward Boggis-Rolfe
ODBC trace log file
Attachment: SQL dataconnect5.LOG (application/octet-stream, text), 28.92 KiB.
[10 Apr 2011 19:12]
Edward Boggis-Rolfe
OK more information, it looks as though buffer (for the bound non blob columns) is getting trashed with data from the unbound blob data. Secondly the buffer size is not being checked or updated after the first iteration. The sequence is SQLFetchScroll SQLSetPos 1 //move to first position//different wierd things happen if not called SQLGetData 4721 characters in record, recieved 4721 characters, reported 4721 in StrLen_or_IndPtr SQLSetPos 2 //move to next position SQLGetData >4721 characters in record, recieved 4721 characters, reported 4721 in StrLen_or_IndPtr //error SQLSetPos 3 //move to next position SQLGetData 11 characters in record, recieved 4721 characters (mostly garbage after 11 characters), reported 4721 in StrLen_or_IndPtr //error
[15 Apr 2011 9:24]
Bogdan Degtyariov
Edward, Thank you for reporting the problem in Connector/ODBC driver. I checked the ODBC trace file you attached, but it looked very much like one of the standard tests from the testing suite, which successfully passed. Do you have a test case for this bug? It can be in any language (C/C++ preferable). With the test case it is much easier to diagnose the problem or spot mistakes in the test itself. Thanks.
[15 Apr 2011 10:56]
Edward Boggis-Rolfe
Hi I will try to, the problem is the code is heavily embedded in something else that I am sure that you do not want to debug. I will try and get something to you soon. The thing generally goes haywire in my when you have a mixture of bound columns and unbound text blob columns, so some of the data is automatically connected to an array of data and in others I am having to use SQLGetData, using SQLFetchScroll with more than row to retrieve in each rowset, and using SQLSetPos to go from one row in the row set to the next. I am doing SQLGetInfo SQL_GETDATA_EXTENSIONS and checking the SQL_GD_BLOCK flag, which is there to confirm that I can do this, but it does not. Regards Edward
[16 Jun 2011 4:11]
Bogdan Degtyariov
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.
[28 May 2013 13:16]
Bogdan Degtyariov
I'm closing this bug because I can not continue without feedback from the reporter. If you have new info, please reopen the report.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.045 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.