From ec23d96c86b43046cd2456829aca763ea6ba9935 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 4 Apr 2018 10:47:30 +0200 Subject: oci: Use OCIBindByPos2 to accommodate data longer than USHRT_MAX OCIBindByPos2 is only needed when using execBatch(), binding data that is longer than USHRT_MAX works for exec() so this is left unchanged. Change-Id: Ifdcf91939d184f225d24c13052ea0b81611ecf91 Reviewed-by: Edward Welbourne --- src/plugins/sqldrivers/oci/qsql_oci.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/sqldrivers/oci') diff --git a/src/plugins/sqldrivers/oci/qsql_oci.cpp b/src/plugins/sqldrivers/oci/qsql_oci.cpp index 272e1bc083..aee8e92b36 100644 --- a/src/plugins/sqldrivers/oci/qsql_oci.cpp +++ b/src/plugins/sqldrivers/oci/qsql_oci.cpp @@ -1318,7 +1318,7 @@ struct QOCIBatchColumn ub4 maxLen; ub4 recordCount; char* data; - ub2* lengths; + ub4* lengths; sb2* indicators; ub4 maxarr_len; ub4 curelep; @@ -1392,7 +1392,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVector &boundValues, b QOCIBatchColumn &col = columns[i]; col.recordCount = boundValues.at(i).toList().count(); - col.lengths = new ub2[col.recordCount]; + col.lengths = new ub4[col.recordCount]; col.indicators = new sb2[col.recordCount]; col.maxarr_len = col.recordCount; col.curelep = col.recordCount; @@ -1556,7 +1556,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVector &boundValues, b // binding the column - r = OCIBindByPos( + r = OCIBindByPos2( d->sql, &bindColumn.bindh, d->err, i + 1, bindColumn.data, bindColumn.maxLen, -- cgit v1.2.3