[Libreoffice-commits] core.git: connectivity/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Sep 1 12:46:47 UTC 2018


 connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx |    2 +-
 connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx          |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 897f9c0dbcfdf895668bea1a1ad965542979a974
Author:     Tamas Bunth <tamas.bunth at collabora.co.uk>
AuthorDate: Fri Aug 31 18:20:50 2018 +0200
Commit:     Tamás Bunth <btomi96 at gmail.com>
CommitDate: Sat Sep 1 14:46:27 2018 +0200

    mysqlc: implement beforeFirst and fix findColumn
    
    Change-Id: I9a12ef6c61b83f588be89ed9aff301d570155d74
    Reviewed-on: https://gerrit.libreoffice.org/59880
    Tested-by: Jenkins
    Reviewed-by: Tamás Bunth <btomi96 at gmail.com>

diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
index f54ded42d5e9..a194b77b9f46 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 f6c41e182a01..9234ad532ea5 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
@@ -143,7 +143,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))
@@ -542,8 +542,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()


More information about the Libreoffice-commits mailing list