Bug #70946 Driver Returns Wrong Length for Output Parameter Streams
Submitted: 18 Nov 2013 22:53 Modified: 14 Feb 2014 19:00
Reporter: Lawrenty Novitsky Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.3 OS:Any
Assigned to: Lawrenty Novitsky CPU Architecture:Any

[18 Nov 2013 22:53] Lawrenty Novitsky
Description:
According to http://msdn.microsoft.com/en-us/library/ms715441%28v=vs.85%29.aspx
"When SQLGetData is called multiple times in succession for the same column, this is the length of the data available at the start of the current call; that is, the length decreases with each subsequent call." And also "The last call to SQLGetData must always return the length of the data, not zero or SQL_NO_TOTAL."

That isn't the case with output parameters streams.

How to repeat:
Look at output parameters streams testcases in the c/odbc testsuite.

Suggested fix:
Change driver's behaviour to conform with  specs.
[23 Jan 2014 11:00] Bogdan Degtyariov
Patch pushed into C/ODBC 5.3 source tree
[14 Feb 2014 18:59] Daniel So
Added the following entry into the Connector/ODBC 5.3.2 changelog:

"SQLGetData did not return correct length of the data when retrieving data from an output parameter stream."