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. Pick-to: 6.4 6.2 5.15 Change-Id: Ic7dcc2117e6f05b63c83f21c6a84ba7e0bda2b2d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
a0dfa8c4d2
commit
91374bb632
@ -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