v0.4.0 -- atomic-DDL participation (closes A-5)
v0.4.0 — atomic-DDL participation (closes A-5)
Wires the TidesDB-MySQL plugin into MySQL 9.7's atomic-DDL contract end-to-end. Crash-during-DDL no longer leaves the data dictionary and the column-family list divergent, and engine-private schema metadata is now portable via SDI. The bundled TidesDB engine is unchanged from v0.3.1 (still v9.3.2, still unpatched) — all changes are plugin-side.
Added
HTON_SUPPORTS_ATOMIC_DDLflag activated on the handlerton — MySQL now treats TidesDB as a full participant in the DD transaction.- 6 SDI tablespace callbacks (
sdi_create / sdi_drop / sdi_get_keys / sdi_get / sdi_set / sdi_delete) backed by a dedicated__tidesdb_sdimetadata column family.mysqldump --tab,IMPORT TABLE, and clone can now capture TidesDB engine-private metadata portably. - 8 DDSE callback stubs (
ddse_dict_init / dict_init / dict_recover / dict_cache_reset / dict_cache_reset_tables_and_tablespaces / dict_get_server_version / dict_set_server_version / is_dict_readonly) — wired for a future "TidesDB hosts the data dictionary" capability; inert in v0.4.0. - Single logical tablespace
tidesdb_systemregistered viaPlugin_tablespace. prepare_create/validate_open/prepare_drop— persist CF binding (cf_name + SHA-256 schema fingerprint + CRC32 options checksum + atomic_ddl marker + creation epoch) intodd::Table::se_private_dataon CREATE; validate on OPEN; clean up SDI on DROP.- Inplace ALTER state machine now consumes its
dd::Table *parameters; emits updated SDI on commit. DdSyncReconciler— symmetric-difference reconciliation between the DD and the TidesDB CF list (excluding__-prefixed internal CFs), driven via thetidesdb_orphan_actionsysvar (drop / quarantine / log_only).- 2 new sysvars:
tidesdb_atomic_ddl_strict(BOOL, default ON) andtidesdb_orphan_action(ENUM, defaultquarantine). - 21 new MTR tests under the
tidesdb_ddl_*prefix + 10 new gtest cases for the pure helpers.
Changed
- Inplace ALTER virtuals now consume
dd::Table *(previously[[maybe_unused]]). ha_tidesdb::rename_table/ha_tidesdb::delete_tableflush the engine transaction before MySQL's CF mutations begin (pre-Task-13 ordering preserved at the engine layer).
Fixed
- COPY-ALTER 2PC SIGSEGV (commit
0d7fe2c). Latent heap-use-after-free inside the TidesDB C library (tidesdb_iter_release_sst_source_block) — exposed only after the HTON flag activation changed MySQL's commit ordering. Tactical fix flushes the engine txn at the top ofrename_tableanddelete_table; long-term fix (SE-private DDL journal) deferred to v0.5.0.
Upgrade notes
- Pre-v0.4.0 tables don't auto-emit SDI on open. To upgrade: run
ALTER TABLE t ENGINE=TIDESDB(no-op ALTER) to populatese_private_data+ emit SDI. - Default
tidesdb_atomic_ddl_strict=ONrejects tables whosese_private_datais missing the atomic-DDL keys. Set OFF temporarily during the upgrade window.
Validation
Full validation matrix green — see docs/v0.4.0-validation-report.md:
- MTR: 68 PASS / 0 FAIL / 15 SKIPPED
- gtest: 10/10 PASS (
SdiPackKey3/3 +ReconcilerDelta7/7) - mwbench 1 GiB integrity: PASS (290 MiB/s, 0 corruption, 0 misses)
- HammerDB SMOKE + WARE=10: PASS, 0 handler errors
- SIGKILL crash-recovery: PASS (WAL durably recovered)
- v0.3.1 vs v0.4.0 head-to-head HammerDB: within single-iteration noise
Artifact
perconalab/tidesdb-mysql:0.4.0— digestsha256:6fcfc8ebf142c4a078185ef1b3cdf8ba7d28b3132d3a0e554926a88c457ce04c- Plugin .so SHA-256:
af149b16afebe45c96c3a5d6b4451a44fcfec596c4a9d8434f03fc0607e618e4(9,483,640 bytes)
docker pull perconalab/tidesdb-mysql:0.4.0
Note: an initial release artifact pushed at 2026-06-04 17:50 contained a stale
.sobuilt before commits374a789and0d7fe2c(size 6,903,416, SHAcf9eb516…) — that build lacked theHTON_SUPPORTS_ATOMIC_DDLactivation and the COPY-ALTER fix. Corrected artifact re-pushed at 20:57. If you pulled the image during the broken window, re-pull. See the rebuild note in the validation report.