v0.2.1 — modular refactor + ADD FULLTEXT back-populate
TidesDB MySQL plugin — v0.2.1
Maintenance release on top of v0.2.0. Large internal restructuring (no
SQL/feature surface change), one user-facing fix, plus a HIGH defect that
fix introduced and which is now resolved before tagging.
Tests: 37/37 hand-rolled + 60/60 MTR pass (2 intentional skips —
MariaDB-only VECTOR, native partitioning). tidesdb_ttl (timing-
sensitive, historically flaky under full-suite pressure) passed in the
release run.
What changed
User-facing fix
ALTER TABLE … ADD FULLTEXT INDEXnow back-populates existing rows.
Previously the inplace-ALTER populate scan skipped FULLTEXT indexes, so
adding a FULLTEXT index to a table that already had rows left those rows
unsearchable — only rows written after the index existed matched.
The populate scan now tokenizes and indexes existing rows, mirroring the
write_rowFTS path (term/df codec, BM25 meta counters), with correct
field-pointer rebasing onto the decoded row buffer.
Correctness (HIGH, found and fixed during this cycle)
- F-1: the new back-populate wrote FTS meta counters per-row into the
data CF in batches. An aborted/KILLed build (rollback drops only the new
index CF, not the data CF) left inflatedtotal_docs/total_words, so a
retry double-counted and skewed BM25 ranking. Fixed: per-index
accumulators flushed in a single post-final-commit txn; aborted builds
now write no meta and a retry starts clean. New regression test
tidesdb_fts_add_index_keynrcovers DROP+ADD-in-one-ALTER (key-number
shift) and a DROP/re-ADD identical-ranking check.
Internal restructuring (no behavior change, verified)
ha_tidesdb.cc went from ~12k to ~8.5k lines; cohesive subsystems were
extracted into focused translation units, each behavior-preserving and
regression-clean:
| Module | Contents |
|---|---|
tidesdb_master_key.{h,cc} |
at-rest encryption / master-key subsystem |
tidesdb_row_lock.{h,cc} |
pessimistic row-lock manager + deadlock walker |
tidesdb_engine_context.{h,cc} |
engine handle / schema CF / conflict info |
tidesdb_fts.{h,cc} |
full-text search subsystem |
tidesdb_spatial.{h,cc} |
Hilbert/MBR spatial index subsystem |
tidesdb_portability.{h,cc} |
MariaDB→MySQL OS/runtime shims (real impls) |
tidesdb_inplace_alter.{h,cc} |
online-DDL state machine |
tidesdb_compat.h is now exclusively MariaDB→MySQL renames / type
aliases / #define-as-0 stubs.
Known issues (pre-existing, tracked)
A deep multi-agent review of the extractions and the FTS fix
(docs/code-review-A2-A7-report.md) closed F-1 (above) and catalogued 8
lower-severity pre-existing items (TTL not threaded through the
populate loop, populate put best-effort-continue, uint16 tf wrap,
two unsanitized sysvar-update log lines, encrypted-flag INPLACE flip,
unregistered FTS PSI keys, duplicate stop-word, strxnmov off-by-one).
None are regressions in this release; all are documented in the report
with recommended fixes for a follow-up hygiene pass.
Runnable image — published on Docker Hub
docker pull evgeniypatlan/test-images:mysql-9.7-tidesdb-v0.2.1
# or the moving tag
docker pull evgeniypatlan/test-images:mysql-9.7-tidesdb-latestImage digest: sha256:822fe343c7788318a5a1f9a3f6eed0af2bc8349d2005cc5cf033c416848eabe0
(both tags resolve to this digest — bit-identical to the locally
smoke-tested image)
Size: 967 MB
Base: Oracle Linux 9 + gcc-toolset-14 (Stage 1) → mysql:9.7 (Stage 2)
Quick smoke
docker run --rm -d --name tidesdb-v021 -p 3307:3306 \
-e MYSQL_ALLOW_EMPTY_PASSWORD=1 \
evgeniypatlan/test-images:mysql-9.7-tidesdb-v0.2.1
# wait ~10s for mysqld, then:
docker exec -it tidesdb-v021 mysql -uroot -e \
"SELECT engine, support, transactions FROM information_schema.engines WHERE engine='TidesDB';"
# expect: TidesDB | YES | YESTo rebuild from source: scripts/release-image.sh v0.2.1 (add --push
to republish; without it, builds + smoke-tests locally with no
credentials, tagging tidesdb/mysql:9.7).