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

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Sat Aug 31 03:37:41 UTC 2019


 connectivity/source/drivers/firebird/DatabaseMetaData.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 50785ac52579153ed78a4fba268a54fd4d0e710e
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Fri Aug 30 16:59:58 2019 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sat Aug 31 05:37:08 2019 +0200

    tdf#118809: Fill DatabaseProductName and DatabaseProductVersion for Firebird
    
    Thank you to Drew Jensen for the suggestion here:
    https://bugs.documentfoundation.org/show_bug.cgi?id=118809#c3
    
    Change-Id: Ie9b5a2c744b158100b2306b27b1d56a30afc5182
    Reviewed-on: https://gerrit.libreoffice.org/78302
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index f73cc5e62a8d..57af351924e3 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -598,12 +598,17 @@ OUString SAL_CALL ODatabaseMetaData::getDriverVersion()
 
 OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion(  )
 {
-    return OUString();
+    uno::Reference< XStatement > xSelect = m_pConnection->createStatement();
+
+    uno::Reference< XResultSet > xRs = xSelect->executeQuery("SELECT rdb$get_context('SYSTEM', 'ENGINE_VERSION') as version from rdb$database");
+    xRs->next(); // first and only row
+    uno::Reference< XRow > xRow( xRs, UNO_QUERY_THROW );
+    return xRow->getString(1);
 }
 
 OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName(  )
 {
-    return OUString();
+    return "Firebird (engine12)";
 }
 
 OUString SAL_CALL ODatabaseMetaData::getProcedureTerm(  )


More information about the Libreoffice-commits mailing list