diff --git a/src/plugins/sqldrivers/oci/qsql_oci.cpp b/src/plugins/sqldrivers/oci/qsql_oci.cpp index 32d3681a17..a4793351de 100644 --- a/src/plugins/sqldrivers/oci/qsql_oci.cpp +++ b/src/plugins/sqldrivers/oci/qsql_oci.cpp @@ -206,6 +206,7 @@ protected: QVariant lastInsertId() const Q_DECL_OVERRIDE; bool execBatch(bool arrayBind = false) Q_DECL_OVERRIDE; void virtual_hook(int id, void *data) Q_DECL_OVERRIDE; + bool fetchNext() override; }; class QOCIResultPrivate: public QSqlCachedResultPrivate @@ -2097,6 +2098,14 @@ void QOCIResult::virtual_hook(int id, void *data) QSqlCachedResult::virtual_hook(id, data); } +bool QOCIResult::fetchNext() +{ + Q_D(QOCIResult); + if (isForwardOnly()) + d->cache.clear(); + return QSqlCachedResult::fetchNext(); +} + ////////////////////////////////////////////////////////////////////////////