diff options
author | Mark Brand <mabrand@mabrand.nl> | 2012-07-17 09:32:20 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-13 23:16:38 +0200 |
commit | 85b624a969c2674f726b6e80af1418bdd9f91969 (patch) | |
tree | 1df6f0d969c5272e62c12b3ec38871b2b6bb01e0 | |
parent | bbec226432ec1d42031c493b16d9affb5fa2fb76 (diff) |
qsql_oci: use OCI_COMMIT_ON_SUCCESS for SELECT without transaction
Otherwise, the open statement, say in QSqlQueryModel, will prevent
other statements from running.
Task-number: QTBUG-18608
Change-Id: Icdd6817fb981678be6fb70ade21a8123e152dcf6
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
-rw-r--r-- | src/sql/drivers/oci/qsql_oci.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp index 02eda36c9a..82dc854c3f 100644 --- a/src/sql/drivers/oci/qsql_oci.cpp +++ b/src/sql/drivers/oci/qsql_oci.cpp @@ -1962,13 +1962,8 @@ bool QOCIResult::exec() return false; } - if (stmtType == OCI_STMT_SELECT) { - iters = 0; - mode = OCI_DEFAULT; - } else { - iters = 1; - mode = d->transaction ? OCI_DEFAULT : OCI_COMMIT_ON_SUCCESS; - } + iters = stmtType == OCI_STMT_SELECT ? 0 : 1; + mode = d->transaction ? OCI_DEFAULT : OCI_COMMIT_ON_SUCCESS; // bind placeholders if (boundValueCount() > 0 |