Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
Description
The purpose of this task is to ensure that CREATE TABLE is atomic.
The CREATE logic should be:
- Log CREATE TABLE/VIEW/SEQUENCE to be created to ddl log
- Execute statement
- Mark CREATE done in ddl log with xid
- Update binary log
- Mark ddl log entry complete
During recovery, delete any incomplete objects that are not in the binary log.
All part of CREATE are now atomic, in the sense that if there is a crash, there will be no temporary tables left and all tables
will be consistent.
There is still one thing that should be fixed
CREATE OR REPLACE TABLE foo ... is, as before, implemented as:
DROP TABLE IF EXISTS foo;
CREATE TABLE foo ..
The problem is that if CREATE TABLE fails or the server crashes during the create, the old table foo will not be recovered.
MDEV-25292 will fix this.
Attachments
Issue Links
- is part of
-
MDEV-17567 Atomic DDL
- Closed
- relates to
-
MDEV-25292 Atomic CREATE OR REPLACE TABLE
- Stalled