diff options
author | Charles Yin <charles.yin@nokia.com> | 2010-10-28 10:13:34 +1000 |
---|---|---|
committer | Charles Yin <charles.yin@nokia.com> | 2010-11-01 10:04:57 +1000 |
commit | 81fc8ec995a07909e59602b9281fbebfff4bd94c (patch) | |
tree | 08e4a6d96dd6ae839a884dcdc8a4df373edd3acd /src/sql/drivers | |
parent | f9d30be978f5f7f0ebf0b240064268037f01ebd5 (diff) | |
download | qt4-tools-81fc8ec995a07909e59602b9281fbebfff4bd94c.tar.gz |
Fix QTBUG-14640:oci performance problem with qlonglong
missing qlonglong switch case in bindValue(), so all qlonglong value
fall back into QString, which makes the query slow.
Change-Id: I7d8bf1c44ce3aaa15ee85be325a5c98dc3ed3ce1
Task-number:QTBUG-14640
Reviewed-by: Michael Goddard
Diffstat (limited to 'src/sql/drivers')
-rw-r--r-- | src/sql/drivers/oci/qsql_oci.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp index 3f30ea52cd..2392a17792 100644 --- a/src/sql/drivers/oci/qsql_oci.cpp +++ b/src/sql/drivers/oci/qsql_oci.cpp @@ -291,6 +291,14 @@ int QOCIResultPrivate::bindValue(OCIStmt *sql, OCIBind **hbnd, OCIError *err, in sizeof(uint), SQLT_UIN, indPtr, 0, 0, 0, 0, OCI_DEFAULT); break; + case QVariant::LongLong: + r = OCIBindByPos(sql, hbnd, err, + pos + 1, + // if it's an out value, the data is already detached + // so the const cast is safe. + const_cast<void *>(data), + sizeof(OCINumber), + SQLT_VNU, indPtr, 0, 0, 0, 0, OCI_DEFAULT); case QVariant::Double: r = OCIBindByPos(sql, hbnd, err, pos + 1, |