Skip to content

Commit

Permalink
Fix MDEV-24493
Browse files Browse the repository at this point in the history
  • Loading branch information
Buggynours committed Oct 15, 2021
1 parent 46fed49 commit 94fb9d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion storage/connect/colblk.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*************** Colblk H Declares Source Code File (.H) ***************/
/* Name: COLBLK.H Version 1.7 */
/* */
/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */
/* (C) Copyright to the author Olivier BERTRAND 2005-2019 */
/* */
/* This file contains the COLBLK and derived classes declares. */
/***********************************************************************/
Expand Down
9 changes: 4 additions & 5 deletions storage/connect/odbconn.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/***********************************************************************/
/* Name: ODBCONN.CPP Version 2.3 */
/* Name: ODBCONN.CPP Version 2.4 */
/* */
/* (C) Copyright to the author Olivier BERTRAND 1998-2017 */
/* (C) Copyright to the author Olivier BERTRAND 1998-2021 */
/* */
/* This file contains the ODBC connection classes functions. */
/***********************************************************************/
Expand Down Expand Up @@ -1509,7 +1509,7 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
ThrowDBX(MSG(COL_NUM_MISM));

// Now bind the column buffers
for (n = 1, colp = tocols; colp; colp = (PODBCCOL)colp->GetNext())
for (colp = tocols; colp; colp = (PODBCCOL)colp->GetNext())
if (!colp->IsSpecial()) {
buffer = colp->GetBuffer(m_RowsetSize);
len = colp->GetBuflen();
Expand All @@ -1525,12 +1525,11 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
htrc("Binding col=%u type=%d buf=%p len=%d slen=%p\n",
n, tp, buffer, len, colp->GetStrLen());

rc = SQLBindCol(hstmt, n, tp, buffer, len, colp->GetStrLen());
rc = SQLBindCol(hstmt, colp->GetIndex(), tp, buffer, len, colp->GetStrLen());

if (!Check(rc))
ThrowDBX(rc, "SQLBindCol", hstmt);

n++;
} // endif pcol

} catch(DBX *x) {
Expand Down

0 comments on commit 94fb9d9

Please sign in to comment.