summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2012-01-19 19:29:36 +0100
committerMichael Stahl <mstahl@redhat.com>2012-01-20 19:12:00 +0100
commitfd29a786e3e94710d1e79c0a6c510491ef461302 (patch)
tree0f9515dc149eb1a141f4e6f397a1647eaf2ee6d0
parent7c18b784ce1e6a5e71e978cd3c896b2ddc73d649 (diff)
fdo#44025: repair dbaccess::ORowSetCache::isLast() after matrix (re)fill
After filling matrix, *do* check if we hit the last row and update m_nRowCount accordingly. Else, a subsequent isLast() will return true on the last row of the prefetch window, even if it is not the last row of the data. Thus the algorithm: while ( ! pResultSet->isLast() ) { //do stuff pResultSet->next() } will stop too soon, which is exactly the symptom in fdo#44025. Signed-off-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx2
1 files changed, 0 insertions, 2 deletions
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 49f6368e6e38..272d260e3449 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -803,7 +803,6 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos
}
// we have to read one row forward to ensure that we know when we are on last row
// but only when we don't know it already
- /*
if(!m_bRowCountFinal)
{
if(!m_pCacheSet->next())
@@ -816,7 +815,6 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos
m_nRowCount = std::max(i,m_nRowCount);
}
- */
return bCheck;
}