Changes for version 0.000053 - 2026-07-10
- Temp dir names now include the pid: File::Temp derives names from rand(), so forked or identically-seeded processes (e.g. under Test2::Plugin::SRand's date seed) drew identical DB-QUICK-* name sequences and could converge on one directory, corrupting a live database.
- MySQL-family servers are now started with loose-mysqlx=OFF; the X Plugin defaults ON with a global default socket (/tmp/mysqlx.sock) and TCP port (33060), so concurrent instances contended on shared resources despite per-instance datadirs.
- Fixed stop()/eliminate() signals being silently lost when they raced watcher startup: SIGTERM/SIGINT were SIG_IGN'd (discarded) across the watcher's exec instead of blocked (held pending) like SIGUSR1 already was, so a stop landing in that window left the watcher running until the caller gave up and killed it, orphaning a live server whose data dir stayed locked; the Pool build-then-stop pattern hit this constantly.
- Watcher::wait no longer kills a watcher that is legitimately blocked reaping an unkillable (e.g. disk-sleep) server, which orphaned a live server and let stop() return while the data dir was still locked; it now waits longer (QDB_STOP_LEASH), and verifies server death with a read-only probe before returning.
- Raised the default QDB_STOP_GRACE from 4 to 10 seconds and dropped the Pool tests' small-grace override: a normal MySQL 8 or loaded-host PostgreSQL clean shutdown routinely exceeds 4-5s, making escalation warnings and needless SIGKILLs (plus InnoDB crash recovery on the next clone start) the common case; the wedge that once justified a small grace was the lost-signal bug above.
- PostgreSQL instances now run with autovacuum=off by default: on PostgreSQL <= 14 the autovacuum launcher could stall shutdown for 10s (PGSTAT_MAX_WAIT_TIME) waiting on the stats collector, routinely blowing the stop grace and drawing SIGQUIT escalations; short-lived test databases gain nothing from autovacuum, and the setting can be overridden.
- DESTROY/eliminate teardown now disconnects this process's DBI handles first (like stop() already did); a connected handle made PostgreSQL's smart shutdown wait out the whole stop grace.
- Clones now start with fresh logs; clone_dir copied the source's error.log and cmd-log-* files, so a clone's logs appeared to contain the parent's history.
- t/watcher_fast_kill.t child-readiness now uses pipe synchronization instead of polling for a marker file under a 5s deadline a loaded smoker could blow.
- t/watcher_fast_kill.t: widened the SIGQUIT-to-SIGKILL escalation gap (grace 1 -> 4) in the fast-sig subtest; on slow smokers the child was not scheduled in time to run its QUIT handler before SIGKILL landed, spuriously failing the marker assertion.
- Data-dir deletion no longer aborts the process when the watcher and the owning process race to delete the same directory; File::Path's "cannot chdir ... aborting" die bypasses its error handler, and turned otherwise-passing FreeBSD smoker runs into FAILs during cleanup.
- The Drivers/QuickDB/Pool tests now run once per database installation, forking a subprocess per install; with AUTHOR_TESTING set the test helpers live-scan ~/dbs/*/bin for developer installs in addition to the system install (nothing in lib/ consults ~/dbs).
- Removed the stale hardcoded ~/dbs PATH prepends from the tests; added AGENTS.md with the developer testing protocol.
- t/Drivers tests now quote the -target class name; the barewords failed to compile under Test2::Harness (yath), which enables strict before line 1.
- PostgreSQL driver now reports not viable when bootstrap or autostart is requested as root (EUID 0), since initdb and postgres refuse to run as root, turning a start timeout into a clean skip (GH #12).
- t/broken_mariadb_versions.t now skips on MSWin32, where its #!/bin/sh stub servers cannot execute and made the MDEV-38811 refusal check spuriously fail.
Documentation
Modules
Quickly start a db server.
Base class for DBIx::QuickDB drivers.
DuckDB driver for DBIx::QuickDB.
MariaDB MySQL driver for DBIx::QuickDB.
Get ANY MySQL driver for DBIx::QuickDB.
MySQL MySQL driver for DBIx::QuickDB.
Percona MySQL driver for DBIx::QuickDB.
PostgreSQL driver for DBIx::QuickDB.
SQLite driver for DBIx::QuickDB.
Define a pool of databases to clone on demand.
Build hash based classes.
Daemon that sits between main process and the server.
Quickly spin up temporary Database servers for tests.
Provides
in lib/DBIx/QuickDB/Util.pm