Skip to content

Hsqldb2 - #520

Open
jimjag wants to merge 11 commits into
trunkfrom
hsqldb2
Open

jimjag wants to merge 11 commits into
trunkfrom
hsqldb2

Conversation

@jimjag

@jimjag jimjag commented Nov 9, 2026

Copy link
Copy Markdown
Member

Upgrade bundled HSQLDB from 1.8.0.11 to 2.5.0

  • maintain backwards compatibility
  • passes test suite

Pedro Giffuni and others added 11 commits November 8, 2026 06:56
Upgrade the bundled HSQLDB database engine from 1.8.0.11 to 2.5.0.

While newer versions exist, 2.5.0 is chosen for two key advantages:
  - It still opens older 1.8.x databases.
  - It doesn't require Java 11 or alternative hacks like newer versions.

Changes to build configuration:
  - main/hsqldb/version.mk: Update version numbers (1.8.0 -> 2.5.0)
  - main/hsqldb/makefile.mk: Update TARFILE_NAME, TARFILE_ROOTDIR,
    TARFILE_MD5 to match upstream hsqldb-2.5.0.zip. Remove obsolete
    CONVERTFILES entry for Library.java (removed in 2.5.0). Change
    Ant target from 'jar' to 'hsqldb'. Clear PATCH_FILES (all old
    patches are obsolete).
  - main/external_deps.lst: Update MD5 and name for hsqldb-2.5.0.zip
  - main/hsqldb/prj/d.lst: Update jar delivery path for new directory
    structure (hsqldb-2.5.0/hsqldb/lib/).
  - main/configure.ac: Update version check for system hsqldb to accept
    2.5.0+.

API compatibility changes for connectivity drivers:
  - StorageAccess.java: Implement org.hsqldb.lib.Storage instead of
    org.hsqldb.persist.ScaledRAInterface (removed in HSQLDB 2.0+).
  - StorageFileAccess.java: Update openOutputStreamElement() to
    accept a boolean 'append' parameter per the new FileAccess
    interface. Update renameElement() to accept a boolean
    'copyIfFailed' parameter.

Native code compatibility:
  - HStorageMap.cxx: Fix StreamHelper destructor to properly close
    read-only streams.
  - HStorageAccess.cxx: Add missing include for Unicode handling.
  - HDriver.cxx: Add shutdown required prompt and database conversion
    handling for HSQLDB 2.x database compatibility.
  - hsqldb_res.hrc: Add STR_CONVERT_TO_NEW_VERSION and
    STR_SHUTDOWN_REQUIRED resource string IDs.
  - conn_shared_res.src: Add resource strings for database upgrade
    and shutdown prompts.

Patch removals:
  - Remove obsolete patches: i121754.patch, runfinalizers.patch,
    script.patch, text_tables.patch
The patch now throws when the storage class cannot be loaded instead of
falling back to the file system.
…'No'

dbaccess never passed the document's InteractionHandler to the driver.
With no answer at all it still converts, since headless the default handler
answers nothing.
The prompt holds the data source mutex; a connect from another thread can deadlock.
With the type check first, a NULL DOUBLE was equal to an INTEGER 0.
* Replace std::hash_map/hash_set with std::unordered_map/unordered_set on trunk (C++11)

GCC 15 removed std::hash_map/std::hash_set (GNU extensions) from libstdc++.
Replace all 628 occurrences across 477 files with std::unordered_map/
std::unordered_set, updating #include <hash_map>/<hash_set> to

Affects: vcl, crashrep, extensions, dbaccess, scripting, sw, io, rdbmaker,
codemaker, unodevtools, and many other modules.

* Migrate remaining std::hash_map/std::hash_set to std::unordered_map/std::unordered_set

Replace TR1/backport hash containers with C++11 standard equivalents
in source files not yet covered by trunk's migration.

* Replace std::hash_multimap with std::unordered_multimap in propcontroller.hxx

std::hash_multimap is a GNU extension removed from GCC 13's libstdc++,
causing a build failure in the pcr module (propcontroller.obj).
std::unordered_multimap is the C++11 standard equivalent already used
elsewhere in this file and supports all operations performed on
m_aDependencyHandlers.

* Replace std::hash_multimap with std::unordered_multimap in oleobjw.hxx

std::hash_multimap is a GNU extension removed from GCC 13's libstdc++.
The functors hashOUString_Impl/equalOUString_Impl are already used with
std::unordered_map on line 74 of the same file, and all operations on
m_mapComFunc (find, end, insert) are supported by std::unordered_multimap.

---------

Co-authored-by: Pedro F. Giffuni <pfg@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant