[MDEV-25920] Atomic DROP DATABASE Created: 2021-06-15  Updated: 2024-02-07

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Create Table, Partitioning, Storage Engine - InnoDB, Storage Engine - RocksDB
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Marko Mäkelä Assignee: Michael Widenius
Resolution: Unresolved Votes: 1
Labels: None

Issue Links:
Blocks
blocks MDEV-4259 transactional DDL Open
is blocked by MDEV-25919 InnoDB reports misleading lock wait t... Closed
Relates
relates to MDEV-17567 Atomic DDL Closed
relates to MDEV-24408 Crash-safe DROP DATABASE Closed

 Description   

All DDL operations must be atomic before we can really claim to support Atomic DDL (MDEV-17567).

DROP DATABASE was only made crash-safe in MDEV-24408; it is not atomic yet. With the following approach, it should become atomic on XA-capable storage engines:

An atomic implementation of DROP DATABASE would involve the following internal steps:

  1. XA START
  2. For each table in storage engines, invoke handler::delete_table().
  3. If everything succeeded, invoke handlerton::drop_database in each storage engine that implements it.
  4. XA PREPARE in each storage engine
  5. XA COMMIT or XA ROLLBACK in each storage engine.


 Comments   
Comment by Marko Mäkelä [ 2021-06-15 ]

To facilitate this, MDEV-25919 will need to make InnoDB support multiple DDL operations within a transaction.

Generated at Thu Feb 08 09:41:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.