summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorCharles Yin <charles.yin@nokia.com>2010-10-28 00:13:34 (GMT)
committerCharles Yin <charles.yin@nokia.com>2010-11-01 00:04:57 (GMT)
commit81fc8ec995a07909e59602b9281fbebfff4bd94c (patch)
tree08e4a6d96dd6ae839a884dcdc8a4df373edd3acd /src/sql
parentf9d30be978f5f7f0ebf0b240064268037f01ebd5 (diff)
downloadQt-81fc8ec995a07909e59602b9281fbebfff4bd94c.zip
Qt-81fc8ec995a07909e59602b9281fbebfff4bd94c.tar.gz
Qt-81fc8ec995a07909e59602b9281fbebfff4bd94c.tar.bz2
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')
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp8
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 3f30ea5..2392a17 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,