summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2018-08-31 18:20:50 +0200
committerAndras Timar <andras.timar@collabora.com>2018-09-03 10:08:38 +0200
commit5ca8b9752c3afb8a688279aa2306c80ef34f1297 (patch)
tree453bbe99572ce2d716d18caf0d754692eda11f76
parent5ef1ea2339c2e527f1ab5e0189e7db4f7b1c9a94 (diff)
mysqlc: implement beforeFirst and fix findColumn
Change-Id: I9a12ef6c61b83f588be89ed9aff301d570155d74 Reviewed-on: https://gerrit.libreoffice.org/59881 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx2
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx5
2 files changed, 3 insertions, 4 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
index 695f6973512e..dee5d091a353 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
@@ -118,7 +118,7 @@ sal_Int32 SAL_CALL OPreparedResultSet::findColumn(const rtl::OUString& columnNam
MutexGuard aGuard(m_aMutex);
checkDisposed(OPreparedResultSet_BASE::rBHelper.bDisposed);
- MYSQL_FIELD* pFields = mysql_fetch_field(m_pResult);
+ MYSQL_FIELD* pFields = mysql_fetch_fields(m_pResult);
for (sal_Int32 i = 0; i < m_nFieldCount; ++i)
{
if (columnName.equalsIgnoreAsciiCaseAscii(pFields[i].name))
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
index aa2f821fb868..9fa2f64613c0 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
@@ -142,7 +142,7 @@ sal_Int32 SAL_CALL OResultSet::findColumn(const rtl::OUString& columnName)
MutexGuard aGuard(m_aMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- MYSQL_FIELD* pFields = mysql_fetch_field(m_pResult);
+ MYSQL_FIELD* pFields = mysql_fetch_fields(m_pResult);
for (unsigned int i = 0; i < fieldCount; ++i)
{
if (columnName.equalsIgnoreAsciiCaseAscii(pFields[i].name))
@@ -541,8 +541,7 @@ void SAL_CALL OResultSet::beforeFirst()
{
MutexGuard aGuard(m_aMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::beforeFirst", *this);
+ mysql_data_seek(m_pResult, 0);
}
void SAL_CALL OResultSet::afterLast()