summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
index f0f83e42c3a7..5ee7aa943206 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
@@ -691,8 +691,14 @@ sal_Bool SAL_CALL OResultSet::next()
MutexGuard aGuard(m_aMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
ensureResultFetched();
- if (m_nRowPosition + 1 >= m_nRowCount)
+ if (m_nRowPosition + 1 > m_nRowCount) // afterlast
return false;
+ if (m_nRowPosition + 1 == m_nRowCount) // last
+ {
+ // return false but take it to afterlast anyway
+ ++m_nRowPosition;
+ return false;
+ }
++m_nRowPosition;
return true;
}