diff options
author | Tamas Bunth <tamas.bunth@collabora.co.uk> | 2018-09-06 16:58:42 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-09-07 15:42:59 +0200 |
commit | 44cef0d785c21f97e9f2b4f089491957301b8063 (patch) | |
tree | b37440089d9d009d37145a579b8ade30ee513735 /connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx | |
parent | 2d7dedd1dd1393c9e593cfde2329e24bfdf48fe5 (diff) |
mysqlc: ensure cursor is not out of range
when calling getXXX() methods of a simple result set.
Change-Id: I9e018385bb73468ea520b03275232c0982cbcba0
Reviewed-on: https://gerrit.libreoffice.org/60095
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx')
-rw-r--r-- | connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx index 9bfd8ecc1aef..7bf7912220ba 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx @@ -71,8 +71,10 @@ class OResultSet final : public OBase_Mutex, MYSQL_RES* m_pResult; unsigned int fieldCount; rtl_TextEncoding m_encoding; - sal_Int32 m_nCurrentField = 0; bool m_bWasNull = false; // did the last getXXX result null? + sal_Int32 m_nRowPosition = 0; + sal_Int32 m_nRowCount = 0; + // OPropertyArrayUsageHelper ::cppu::IPropertyArrayHelper* createArrayHelper() const SAL_OVERRIDE; // OPropertySetHelper @@ -232,9 +234,8 @@ public: css::uno::Sequence<sal_Int32> SAL_CALL deleteRows(const css::uno::Sequence<Any>& rows) SAL_OVERRIDE; - /// @throws SQLException - /// @throws RuntimeException void checkColumnIndex(sal_Int32 index); + void checkRowIndex(); private: using ::cppu::OPropertySetHelper::getFastPropertyValue; |