Skip to content

Version 2.0.2

Choose a tag to compare

@StormBytePP StormBytePP released this 19 Oct 21:03
· 25 commits to master since this release

[Summary]

StormByte Database is the C++26 SQL layer of the StormByte suite.

One API covers SQLite, PostgreSQL, MariaDB and Microsoft SQL Server (MSSQL).
Backends are base classes: you derive your schema, prepare statements and hook connect there.
This repository is not Base, Buffer, Config, Crypto, Logger, Multimedia, Network or System.
It requires StormByte Base 2.1.0 and StormByte-Logger 2.0.2.
The original StormByte-Database source is dual-licensed under LGPL v3.0-or-later or a commercial license.

If you landed here from a release link and have not read the tree:

Added

  • Release workflow. The archive name is StormByte-Database-<tag>-<os>-<arch>[-stdlib].zip. The build compiles SQLite, PostgreSQL, MariaDB and the MSSQL client, and starts PostgreSQL and MariaDB before the build so PGO training can run those tests. On Linux the MSSQL container is started as well. macOS and Windows have no SQL Server during a tag build, so that test skips.
  • THIRD-PARTY (hyphenated: THIRDPARTY is the same path as the thirdparty/ directory on Windows and macOS) plus COPYING.SQLite, COPYING.PostgreSQL, COPYING.MariaDB, COPYING.FreeTDS and COPYING.OpenSSL. The MSSQL objects are FreeTDS DB-Library, tds, replacements and tdsutils only, under the GNU Library General Public License v2 or later. The FreeTDS server, ODBC driver, CT-Library and tools are not compiled in. OpenSSL 3.5.9 is compiled in because those clients link it.
  • ENABLE_LTO and ENABLE_PGO. CI keeps the compiler and dependency matrix, turns LTO on and runs the tests. Profile-guided optimization, and the documentation, stay on the release workflow.

Fixed

  • InstalledConsumerSmoke also searches the directory of a system StormByte-Logger. WITH_STORMBYTE=SYSTEM does not copy that library into the BuildMaster prefix, so the smoke test failed configure with Could not find LOGGER_LIBRARY and aborted PGO.
  • -stdlib=libc++ and -stdlib=libstdc++ do not count as custom C++ flags. If either is the only extra flag, Release still gets -O2 and the CPU baseline.
  • Bundled MariaDB Connector C no longer builds mariadb_config. WITH_UNIT_TESTS=OFF already skips the connector test suite, and WITH_TOOLS is off, but the helper executable is unconditional on Unix. Its main shares a name with the test programs in the merged Clang profile, so -fprofile-use reports a control-flow hash mismatch and the connector's -Werror aborts the build. The library does not use that executable.
  • MSVC PGO no longer puts /LTCG:PGINSTRUMENT or /LTCG:PGOPTIMIZE in CMAKE_EXE_LINKER_FLAGS. Those flags are add_link_options on this project. A nested project() inherits the cache and its compiler test links cmTC_*.exe, which was never instrumented, so /LTCG:PGOPTIMIZE aborted with LNK1266 (cmTC_*.pgd missing). The cache keeps a bare /LTCG so those /GL objects still link. A static dependency stays LTCG and is optimized by the link that owns the .pgd.
  • Bundled PostgreSQL on Windows is built without LTO. MSVC LTCG left postgres.lib without the backend exports, so libpqwalreceiver.dll failed to link (ResetLatch, ProcessInterrupts and the rest). The client archives are still static.
  • Clang PGO drops .profraw files left by compiler probes before ctest, and llvm-profdata merge uses -failure-mode=all. A probe writes a few hundred bytes for main, with a padded empty symbol name. The default failure mode is any, so that one file aborted the merge even after the instrumented tests had passed.
  • Postgres sends port to PQconnectdbParams. The connection used to omit it, so libpq used 5432 or PGPORT instead of the port this object was given. The constructor takes the port after the logger and defaults to 5432. Callers that do not pass it stay source-compatible.

Changed

  • CI builds with ENABLE_LTO=ON, ENABLE_PGO=OFF and ENABLE_TEST=ON, then runs ctest. Profile-guided optimization stays on the release workflow.
  • Breaking: Database exceptions no longer call std::format. Literal {} is replaced by Safe::String::ReplaceToken, the same way Base, Config and Logger do it. what() paths are unchanged (StormByte.Database.Connection, StormByte.Database.Query.Execute, and the rest). Copy, move and each destructor stay in this module.
  • StormByte Base 2.1.0 and StormByte-Logger 2.0.2 are downloaded release archives (BACKEND=binary). The Logger source tree is no longer a submodule. BuildMaster 2.1.0 is required. optimizations.cmake matches the other modules: Linux x86-64-v3, Apple apple-m1, Windows /O2 /arch:AVX2. No /fp:fast.
  • Postgres and MariaDB tests read the account from the environment. POSTGRES_USER, POSTGRES_PASSWORD and POSTGRES_PORT default to testuser, testpass and 5432. MARIADB_USER, MARIADB_PASSWORD and MARIADB_PORT default to testuser, testpass and 3306. The host and the database name stay localhost or 127.0.0.1, and stormbyte_test.