summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
index 407e927527af..61b8d43fb653 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
@@ -628,6 +628,7 @@ sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 row)
if (nToGo < 0)
nToGo = 0;
+ m_nRowPosition = nToGo;
mysql_data_seek(m_pResult, nToGo);
next();
@@ -648,6 +649,7 @@ sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row)
if (nToGo < 0)
nToGo = 0;
+ m_nRowPosition = nToGo;
mysql_data_seek(m_pResult, nToGo);
next();
@@ -662,7 +664,8 @@ sal_Bool SAL_CALL OResultSet::previous()
if (m_nRowPosition <= 1)
return false;
- mysql_data_seek(m_pResult, m_nRowPosition - 2);
+ m_nRowPosition -= 2;
+ mysql_data_seek(m_pResult, m_nRowPosition);
next();
return true;
}