diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2021-10-15 12:20:33 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2021-10-15 12:20:33 +0200 |
commit | 94fb9d937785e602b6970fb30f8fd0b9257db179 (patch) | |
tree | 7ec892d74f64c91966fcf27c88a4d4525c4acd2c | |
parent | 46fed496b6634248b37fbf2b80a6333aa3659873 (diff) | |
download | mariadb-git-94fb9d937785e602b6970fb30f8fd0b9257db179.tar.gz |
Fix MDEV-24493
-rw-r--r-- | storage/connect/colblk.h | 2 | ||||
-rw-r--r-- | storage/connect/odbconn.cpp | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/storage/connect/colblk.h b/storage/connect/colblk.h index f303528f982..03a467e9230 100644 --- a/storage/connect/colblk.h +++ b/storage/connect/colblk.h @@ -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. */ /***********************************************************************/ diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index 5b20b33e240..8ff8d3a84e1 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -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. */ /***********************************************************************/ @@ -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(); @@ -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) { |