Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-151

In SQLBindParameter BufferLength sets SQL_DESC_OCTET_LENGTH for fixed length types

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.17, 3.0.5
    • Fix Version/s: 3.0.6, 2.0.18
    • Component/s: General
    • Labels:
      None

      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; }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Lawrin Lawrin Novitsky
              Reporter:
              Lawrin Lawrin Novitsky
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: