1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.4' into 10.5

This commit is contained in:
Oleksandr Byelkin
2022-02-01 20:33:04 +01:00
460 changed files with 9909 additions and 2408 deletions

View File

@@ -1419,7 +1419,7 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
PGLOBAL& g = m_G;
void *buffer;
bool b;
UWORD n;
UWORD n, k;
SWORD len, tp, ncol = 0;
ODBCCOL *colp;
RETCODE rc;
@@ -1486,15 +1486,16 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
} else {
do {
rc = SQLExecDirect(hstmt, (PUCHAR)sql, SQL_NTS);
} while (rc == SQL_STILL_EXECUTING);
} while (rc == SQL_STILL_EXECUTING);
if (!Check(rc))
ThrowDBX(rc, "SQLExecDirect", hstmt);
do {
rc = SQLNumResultCols(hstmt, &ncol);
} while (rc == SQL_STILL_EXECUTING);
} while (rc == SQL_STILL_EXECUTING);
k = 0; // used for column number
} // endif Srcdef
for (n = 0, colp = tocols; colp; colp = (PODBCCOL)colp->GetNext())
@@ -1516,18 +1517,23 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
sprintf(m_G->Message, MSG(INV_COLUMN_TYPE),
colp->GetResultType(), SVP(colp->GetName()));
ThrowDBX(m_G->Message);
} // endif tp
} // endif tp
if (m_Tdb->Srcdef)
k = colp->GetIndex();
else
k++;
if (trace(1))
htrc("Binding col=%u type=%d buf=%p len=%d slen=%p\n",
n, tp, buffer, len, colp->GetStrLen());
k, tp, buffer, len, colp->GetStrLen());
rc = SQLBindCol(hstmt, colp->GetIndex(), tp, buffer, len, colp->GetStrLen());
rc = SQLBindCol(hstmt, k, tp, buffer, len, colp->GetStrLen());
if (!Check(rc))
ThrowDBX(rc, "SQLBindCol", hstmt);
} // endif pcol
} // endif colp
} catch(DBX *x) {
if (trace(1))