diff options
author | Andy Shaw <andy.shaw@qt.io> | 2018-04-04 10:47:30 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2018-04-06 12:44:37 +0000 |
commit | ec23d96c86b43046cd2456829aca763ea6ba9935 (patch) | |
tree | d2789fa9f922577ed590d76d405e44dff02638f0 /src/plugins/sqldrivers/oci/qsql_oci.cpp | |
parent | fd87c8da82b4bf52d395a5f9a2687e4eb7a22221 (diff) |
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 <edward.welbourne@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers/oci/qsql_oci.cpp')
-rw-r--r-- | src/plugins/sqldrivers/oci/qsql_oci.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<QVariant> &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<QVariant> &boundValues, b // binding the column - r = OCIBindByPos( + r = OCIBindByPos2( d->sql, &bindColumn.bindh, d->err, i + 1, bindColumn.data, bindColumn.maxLen, |