connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit b3e81068734a33878e7a638138100fd8d722c2dc Author: Tamas Bunth <tamas.bu...@collabora.co.uk> AuthorDate: Tue Sep 11 17:14:49 2018 +0200 Commit: Tamás Bunth <btom...@gmail.com> CommitDate: Thu Sep 13 16:19:05 2018 +0200 mysqlc: Fix XResultSet::absolute and previous We need to update the actual row position after using absolute or previous. Change-Id: Ie85f9679b7a06649a88ac8ee08436bf7f4a58a22 Reviewed-on: https://gerrit.libreoffice.org/60328 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btom...@gmail.com> diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx index 6109849e2a20..3a6e063d7dbf 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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits