[ODBC-365] Length is not returned for SQL_C_WCHAR on SQLFetch if data buffer is NULL Created: 2022-06-13  Updated: 2022-06-13  Resolved: 2022-06-13

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: None
Fix Version/s: 3.1.16

Type: Bug Priority: Major
Reporter: Lawrin Novitsky Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None


 Description   

If application only wants to know the length of WCHAR data in the column(and not the data itself), the driver returns 0



 Comments   
Comment by Lawrin Novitsky [ 2022-06-13 ]

The fix only has been pushed(the testcase for ODBC-359 covers this case)

If application wanted to know length of wchar data(to allocate the buffer
and later fetch it) - i.e. it SQLBindCol only length pointer, and no
data pointer, on SQLFetch connector would put 0 in the length buffer.
Usually that is done with SQLGetData, but this way is also legitimate.

Generated at Thu Feb 08 03:28:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.