Skip to content

fix: MDEV-40651 ALTER TABLE and DDL in general is now executed in an atomic manner b/c previously MariaDB DDL triggered multiple autocommit DDL statements in DuckDB some of those can fail leaving table in unsable state. - #5515

Merged
drrtuy merged 1 commit into
MariaDB:11.4from
drrtuy:mdev-40651-fix-alter-table-edge-cases
Aug 7, 2026

Conversation

@drrtuy

@drrtuy drrtuy commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Make DuckDB ALTER TABLE operations atomic

What

Fix MDEV-40651 by executing all DuckDB statements generated for a single MariaDB ALTER TABLE within one transaction. This prevents partial schema changes when a later DDL statement fails.

Key changes

  • Wrap generated DuckDB ALTER statements in BEGIN/COMMIT and roll back on failure.
  • Preserve MariaDB implicit values when adding NOT NULL columns, then remove temporary defaults where required.
  • Reject partitioned DuckDB tables via HTON_NO_PARTITION.
  • Add MTR coverage for atomic rollback, implicit defaults, and partition rejection.
  • Update DuckDB architecture and incompatibility documentation.

How to test

Run the DuckDB MTR test:

./mtr duckdb.mdev_40651

…atomic manner b/c previously MariaDB DDL triggered multiple autocommit DDL statements in DuckDB some of those can fail leaving table in unsable state.
@drrtuy
drrtuy merged commit f6418ff into MariaDB:11.4 Aug 7, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant