connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 7bbb8191f12f3c3413387be03f9cdf45b5b49735 Author: Tamas Bunth <[email protected]> AuthorDate: Tue Sep 11 17:14:49 2018 +0200 Commit: Andras Timar <[email protected]> CommitDate: Tue Sep 11 18:40:04 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/60329 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> 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; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
