QODBC: correctly fill cache when index() is called
QODBCResult::isNull() incorrectly checked for the validity of the internal row cache which lead to wrong results when the requested column was not yet cached. Change-Id: Ic7dcc2117e6f05b63c83f21c6a84ba7e0bda2b2d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 91374bb6322cf09525e99698c8fae7688c227d74) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5d5ab28eaf
commit
9eb2a5bf8f
@ -1274,7 +1274,7 @@ bool QODBCResult::isNull(int field)
|
||||
Q_D(const QODBCResult);
|
||||
if (field < 0 || field >= d->fieldCache.size())
|
||||
return true;
|
||||
if (field <= d->fieldCacheIdx) {
|
||||
if (field >= d->fieldCacheIdx) {
|
||||
// since there is no good way to find out whether the value is NULL
|
||||
// without fetching the field we'll fetch it here.
|
||||
// (data() also sets the NULL flag)
|
||||
|
Loading…
x
Reference in New Issue
Block a user