[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - config_host/config_firebird.h.in configure.ac dbaccess/CppunitTest_dbaccess_firebird_regression_test.mk dbaccess/CppunitTest_dbaccess_firebird_test.mk dbaccess/Module_dbaccess.mk dbaccess/qa

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 11 08:33:59 UTC 2021


 config_host/config_firebird.h.in                          |    2 
 configure.ac                                              |    6 
 dbaccess/CppunitTest_dbaccess_firebird_regression_test.mk |   70 ---------
 dbaccess/CppunitTest_dbaccess_firebird_test.mk            |   18 +-
 dbaccess/Module_dbaccess.mk                               |    6 
 dbaccess/qa/unit/firebird-regression.cxx                  |  106 --------------
 dev/null                                                  |binary
 7 files changed, 11 insertions(+), 197 deletions(-)

New commits:
commit dcd2ddbbcd3e93161e8f6826c1a8ce9005714f2e
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jun 9 13:41:30 2021 +0100
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri Jun 11 10:33:25 2021 +0200

    allow system firebird 4
    
    drop odb load tests of experimental era odbs that only contain fdb and
    not fbk, that ends up only proving that was a bad idea which we know
    so that's why we stopped doing it
    
    this squashed commit contains...
    
    HAVE_FIREBIRD_30 is not used anymore
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116977
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    
    and...
    
    drop firebird test of initial experimental period fdb-only format
    
    Initially when the firebird embedded database support was first
    experimental we saved the fdb firebird file format.
    
    A test was added by 3f114eb4a2f3994b980aa607f2d4afc58e5aaa1d around then
    (2013) to test loading firebird odbs
    
    Then with
    
    commit de899f0b350e51b1932fa4674f7ce2ae386cd1ce
    Date:   Thu Jun 2 11:56:10 2016 +0200
    
        connectivity: firebird: use ODS12 test database for Firebird 3
    
    if building with firebird 3 a replacement odb was created in firebird
    3.X ODS12 format to use instead of the 2.X ODS11 file.
    
    Those fdb file formats were endian specific and database version
    specific. Which was a well known problem documented in tdf#72987 and a
    blocker for leaving 'experimental' at that point in time.
    
    So finally with
    
    commit 0cc1ddf2d8d6bc7df74fdd8f8f97381df681177d
    Date:   Thu Aug 11 12:02:56 2016 +0200
    
        tdf#72987 GSoC Use Firebird backup format
    
    the save was changed to save the backup fbk file format and load
    restores the database from that fbk file format (2016) when available.
    
    later in
    
    commit 860ecb9e583627ab43097784ad98b41afd983ff6
    Date:   Thu Jan 5 12:58:26 2017 +0100
    
        require firebird 3.0 for build (don't allow 2.5)
    
    the firebird 2.X (ODS11) test of loading the fdb format was
    dropped leaving just the firebird 3.X (ODS12) fdb case because firebird
    3.X cannot directly load the ODS11 format
    
    Now with the appearance of firebird 4 the same problem arises that
    firebird doesn't load older binary formats directly.
    
    In the end all we established here is that an odb containing only a fdb
    is endian and version specific and a bad idea wrt compatibility so we
    shouldn't do that. But we knew that, so embedded firebird databases were
    an experiemental curosity until 0cc1ddf2d8d6bc7df74fdd8f8f97381df681177d
    enabled use of the fbk format.
    
    We're not gaining anything with the test of loading the binary only case
    because we know that's an unsustainable route we abandoned.
    
    Change-Id: I330065f61d2d0fdfeeaeba4ee2e739e222d1c665
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116895
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/config_host/config_firebird.h.in b/config_host/config_firebird.h.in
index b56056cf6ae9..edfbb2df62b4 100644
--- a/config_host/config_firebird.h.in
+++ b/config_host/config_firebird.h.in
@@ -7,6 +7,4 @@ Settings for Firebird
 
 #define ENABLE_FIREBIRD_SDBC 0
 
-#define HAVE_FIREBIRD_30 0
-
 #endif
diff --git a/configure.ac b/configure.ac
index e37fc0195c33..ff5da434d774 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9923,11 +9923,10 @@ if test "$enable_firebird_sdbc" = "yes" ; then
         AC_MSG_CHECKING([Firebird version])
         if test -n "${FIREBIRD_VERSION}"; then
             FIREBIRD_MAJOR=`echo $FIREBIRD_VERSION | cut -d"." -f1`
-            FIREBIRD_MINOR=`echo $FIREBIRD_VERSION | cut -d"." -f2`
-            if test "$FIREBIRD_MAJOR" -eq "3" -a "$FIREBIRD_MINOR" -eq "0"; then
+            if test "$FIREBIRD_MAJOR" -ge "3"; then
                 AC_MSG_RESULT([OK])
             else
-                AC_MSG_ERROR([Ensure firebird 3.0.x is installed])
+                AC_MSG_ERROR([Ensure firebird >= 3 is installed])
             fi
         else
             save_CFLAGS="${CFLAGS}"
@@ -9948,7 +9947,6 @@ int fb_api_is_30(void) { return 0; }
         AC_MSG_RESULT([none])
     else
         dnl Embedded Firebird has version 3.0
-        AC_DEFINE(HAVE_FIREBIRD_30, 1)
         dnl We need libatomic_ops for any non X86/X64 system
         if test "${CPUNAME}" != INTEL -a "${CPUNAME}" != X86_64; then
             dnl ===================================================================
diff --git a/dbaccess/CppunitTest_dbaccess_firebird_regression_test.mk b/dbaccess/CppunitTest_dbaccess_firebird_regression_test.mk
deleted file mode 100644
index 654d2f6168cc..000000000000
--- a/dbaccess/CppunitTest_dbaccess_firebird_regression_test.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,dbaccess_firebird_regression))
-
-$(eval $(call gb_CppunitTest_use_external,dbaccess_firebird_regression,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_firebird_regression, \
-    dbaccess/qa/unit/firebird-regression \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,dbaccess_firebird_regression, \
-    comphelper \
-    cppu \
-    dbaxml \
-    firebird_sdbc \
-    sal \
-    subsequenttest \
-    svt \
-    test \
-    unotest \
-    utl \
-    xo \
-))
-
-$(eval $(call gb_CppunitTest_use_api,dbaccess_firebird_regression,\
-    offapi \
-    oovbaapi \
-    udkapi \
-))
-
-$(eval $(call gb_CppunitTest_use_ure,dbaccess_firebird_regression))
-$(eval $(call gb_CppunitTest_use_vcl,dbaccess_firebird_regression))
-
-$(eval $(call gb_CppunitTest_use_components,dbaccess_firebird_regression,\
-    basic/util/sb \
-    comphelper/util/comphelp \
-    configmgr/source/configmgr \
-    connectivity/source/drivers/firebird/firebird_sdbc \
-    connectivity/source/manager/sdbc2 \
-    dbaccess/util/dba \
-    dbaccess/source/filter/xml/dbaxml \
-    dbaccess/util/dbu \
-    filter/source/config/cache/filterconfig1 \
-    framework/util/fwk \
-    i18npool/util/i18npool \
-    linguistic/source/lng \
-    package/source/xstor/xstor \
-    package/util/package2 \
-    sax/source/expatwrap/expwrap \
-    sfx2/util/sfx \
-    svl/source/fsstor/fsstorage \
-    svl/util/svl \
-    toolkit/util/tk \
-    ucb/source/core/ucb1 \
-    ucb/source/ucp/file/ucpfile1 \
-    unotools/util/utl \
-    uui/util/uui \
-    xmloff/util/xo \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,dbaccess_firebird_regression))
-
-# vim: set noet sw=4 ts=4:
diff --git a/dbaccess/CppunitTest_dbaccess_firebird_test.mk b/dbaccess/CppunitTest_dbaccess_firebird_test.mk
index 88592d922cbd..5065520993e2 100644
--- a/dbaccess/CppunitTest_dbaccess_firebird_test.mk
+++ b/dbaccess/CppunitTest_dbaccess_firebird_test.mk
@@ -7,15 +7,15 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_CppunitTest_CppunitTest,dbaccess_firebird))
+$(eval $(call gb_CppunitTest_CppunitTest,dbaccess_firebird_test))
 
-$(eval $(call gb_CppunitTest_use_external,dbaccess_firebird,boost_headers))
+$(eval $(call gb_CppunitTest_use_external,dbaccess_firebird_test,boost_headers))
 
-$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_firebird, \
+$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_firebird_test, \
     dbaccess/qa/unit/firebird \
 ))
 
-$(eval $(call gb_CppunitTest_use_libraries,dbaccess_firebird, \
+$(eval $(call gb_CppunitTest_use_libraries,dbaccess_firebird_test, \
     comphelper \
     cppu \
     dbaxml \
@@ -29,16 +29,16 @@ $(eval $(call gb_CppunitTest_use_libraries,dbaccess_firebird, \
     xo \
 ))
 
-$(eval $(call gb_CppunitTest_use_api,dbaccess_firebird,\
+$(eval $(call gb_CppunitTest_use_api,dbaccess_firebird_test,\
     offapi \
     oovbaapi \
     udkapi \
 ))
 
-$(eval $(call gb_CppunitTest_use_ure,dbaccess_firebird))
-$(eval $(call gb_CppunitTest_use_vcl,dbaccess_firebird))
+$(eval $(call gb_CppunitTest_use_ure,dbaccess_firebird_test))
+$(eval $(call gb_CppunitTest_use_vcl,dbaccess_firebird_test))
 
-$(eval $(call gb_CppunitTest_use_components,dbaccess_firebird,\
+$(eval $(call gb_CppunitTest_use_components,dbaccess_firebird_test,\
     basic/util/sb \
     comphelper/util/comphelp \
     configmgr/source/configmgr \
@@ -65,6 +65,6 @@ $(eval $(call gb_CppunitTest_use_components,dbaccess_firebird,\
     xmloff/util/xo \
 ))
 
-$(eval $(call gb_CppunitTest_use_configuration,dbaccess_firebird))
+$(eval $(call gb_CppunitTest_use_configuration,dbaccess_firebird_test))
 
 # vim: set noet sw=4 ts=4:
diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
index 49bd9d202c7f..2d2c9ae31c1b 100644
--- a/dbaccess/Module_dbaccess.mk
+++ b/dbaccess/Module_dbaccess.mk
@@ -42,12 +42,6 @@ $(eval $(call gb_Module_add_check_targets,dbaccess,\
     $(if $(ENABLE_JAVA),CppunitTest_dbaccess_tdf126268) \
 ))
 
-# remove if we have a be file for this
-ifeq ($(ENDIANNESS),little)
-$(eval $(call gb_Module_add_check_targets,dbaccess,\
-    CppunitTest_dbaccess_firebird_regression_test \
-))
-endif
 $(eval $(call gb_Module_add_check_targets,dbaccess,\
     CppunitTest_dbaccess_firebird_test \
 ))
diff --git a/dbaccess/qa/unit/data/firebird_empty_le.odb b/dbaccess/qa/unit/data/firebird_empty_le.odb
deleted file mode 100644
index 766c17db2ec9..000000000000
Binary files a/dbaccess/qa/unit/data/firebird_empty_le.odb and /dev/null differ
diff --git a/dbaccess/qa/unit/data/firebird_integer_le.odb b/dbaccess/qa/unit/data/firebird_integer_le.odb
deleted file mode 100644
index da2ec1499198..000000000000
Binary files a/dbaccess/qa/unit/data/firebird_integer_le.odb and /dev/null differ
diff --git a/dbaccess/qa/unit/data/firebird_integer_le_ods12.odb b/dbaccess/qa/unit/data/firebird_integer_le_ods12.odb
deleted file mode 100644
index 95691ed20585..000000000000
Binary files a/dbaccess/qa/unit/data/firebird_integer_le_ods12.odb and /dev/null differ
diff --git a/dbaccess/qa/unit/firebird-regression.cxx b/dbaccess/qa/unit/firebird-regression.cxx
deleted file mode 100644
index faf0a834b9c4..000000000000
--- a/dbaccess/qa/unit/firebird-regression.cxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include "dbtest_base.cxx"
-
-#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
-#include <com/sun/star/sdbc/XColumnLocate.hpp>
-#include <com/sun/star/sdbc/XConnection.hpp>
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XStatement.hpp>
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::sdb;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::uno;
-
-class FirebirdTest
-    : public DBTestBase
-{
-public:
-    void testEmptyDBConnection();
-    void testIntegerDatabase();
-
-    CPPUNIT_TEST_SUITE(FirebirdTest);
-    CPPUNIT_TEST(testEmptyDBConnection);
-    CPPUNIT_TEST(testIntegerDatabase);
-    CPPUNIT_TEST_SUITE_END();
-};
-
-/**
- * Test the loading of an "empty" file, i.e. the embedded database has not yet
- * been initialised (as occurs when a new .odb is created and opened by base).
- */
-void FirebirdTest::testEmptyDBConnection()
-{
-#ifdef OSL_BIGENDIAN
-    auto const tmp = createTempCopy("firebird_empty_be.odb");
-#else
-    auto const tmp = createTempCopy("firebird_empty_le.odb");
-#endif
-    uno::Reference< XOfficeDatabaseDocument > xDocument =
-        getDocumentForUrl(tmp.GetURL());
-
-    getConnectionForDocument(xDocument);
-
-    closeDocument(uno::Reference<lang::XComponent>(xDocument, uno::UNO_QUERY));
-}
-
-/**
- * Test reading of integers from a known .odb to verify that the data
- * can still be read on all systems.
- */
-void FirebirdTest::testIntegerDatabase()
-{
-#ifdef OSL_BIGENDIAN
-    uno::Reference< XOfficeDatabaseDocument > xDocument =
-        getDocumentForFileName("firebird_integer_be_ods12.odb");
-#else
-    uno::Reference< XOfficeDatabaseDocument > xDocument =
-        getDocumentForFileName("firebird_integer_le_ods12.odb");
-#endif
-
-    uno::Reference< XConnection > xConnection =
-        getConnectionForDocument(xDocument);
-
-    uno::Reference< XStatement > xStatement = xConnection->createStatement();
-    CPPUNIT_ASSERT(xStatement.is());
-
-    uno::Reference< XResultSet > xResultSet = xStatement->executeQuery(
-        "SELECT * FROM TESTTABLE");
-    CPPUNIT_ASSERT(xResultSet.is());
-    CPPUNIT_ASSERT(xResultSet->next());
-
-    uno::Reference< XRow > xRow(xResultSet, UNO_QUERY);
-    CPPUNIT_ASSERT(xRow.is());
-    uno::Reference< XColumnLocate > xColumnLocate(xRow, UNO_QUERY);
-    CPPUNIT_ASSERT(xColumnLocate.is());
-
-    CPPUNIT_ASSERT_EQUAL(sal_Int16(-30000),
-        xRow->getShort(xColumnLocate->findColumn("_SMALLINT")));
-    CPPUNIT_ASSERT_EQUAL(sal_Int32(-2100000000),
-        xRow->getInt(xColumnLocate->findColumn("_INT")));
-    CPPUNIT_ASSERT_EQUAL(SAL_CONST_INT64(-9000000000000000000),
-        xRow->getLong(xColumnLocate->findColumn("_BIGINT")));
-    CPPUNIT_ASSERT_EQUAL(OUString("5"),
-        xRow->getString(xColumnLocate->findColumn("_CHAR")));
-    CPPUNIT_ASSERT_EQUAL(OUString("5"),
-        xRow->getString(xColumnLocate->findColumn("_VARCHAR")));
-
-    CPPUNIT_ASSERT(!xResultSet->next()); // Should only be one row
-
-    closeDocument(uno::Reference<lang::XComponent>(xDocument, uno::UNO_QUERY));
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(FirebirdTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list