[ODBC-151] In SQLBindParameter BufferLength sets SQL_DESC_OCTET_LENGTH for fixed length types Created: 2018-06-26  Updated: 2018-06-26  Resolved: 2018-06-26

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: 2.0.17, 3.0.5
Fix Version/s: 3.0.6, 2.0.18

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

Issue Links:
PartOf
is part of ODBC-149 ODBC Connector 3.05 Bug: Connection C... Closed

 Description   

That affects, among other things, parameter array operation. If parameters bound by column, parameter value location will be calculated incorrectly.

To repeat

ODBC_TEST(odbc151)

{ SQLINTEGER Val; SQLLEN Len= 2, OctetLength= 0; SQLHANDLE Apd; CHECK_STMT_RC(Stmt, SQLPrepare(Stmt, "SELECT ?", SQL_NTS)); CHECK_STMT_RC(Stmt, SQLGetStmtAttr(Stmt, SQL_ATTR_APP_PARAM_DESC, &Apd, SQL_IS_POINTER, NULL)); CHECK_STMT_RC(Stmt, SQLBindParameter(Stmt, 1, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER, 0, 0, &Val, Len, &Len)); CHECK_DESC_RC(Apd, SQLGetDescField(Apd, 1, SQL_DESC_OCTET_LENGTH, &OctetLength, SQL_IS_INTEGER, NULL)); is_num(OctetLength, sizeof(SQLINTEGER)); return OK; }

 Comments   
Comment by Lawrin Novitsky [ 2018-06-26 ]

in 3.0 commit 468d5a3, yet to be merged into 2.0

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