-
Type:
Task
-
Status: In Progress (View Workflow)
-
Priority:
Critical
-
Resolution: Unresolved
-
Fix Version/s: 10.6
-
Component/s: Data Definition - Alter Table, Data Definition - Create Table
-
Labels:None
The purpose of this task is to ensure that the following internal operations
are atomic (either all or nothing) for all storage engines:
Manage .frm
Storage engine data dictionary
Binary log
This will solve the following things:
- .frm context and storage engine dictionary is always in sync
- no #sql-xxxx files if server crashes during alter table
- binary log will always contain the DDL statement if it succeeded
The cost of doing the above should not be more than 1-2 sync per DDL.
High level architecture
When doing a DDL, store somewhere (either trough write_ddl_log_entry() or
some new method):
- Operation
- Number of tables
- Table name
- Table id for original table
- Table id for resulting table (in case of rename)
- sql command (for binary log)
If there is no table id (for example for CSV) we would use the
timestamp of the files.
With the above information we would be able to continue from the place
where the operation failed.
Low level architecture (to be done before implementation starts)
Describe in detail the source changes needed for:
CREATE TABLE
CREATE TABLE ... SELECT
DROP TABLE t1,t2,t3,t4;
RENAME TABLE t1 as t2, t2 as t1;
ALTER TABLE
- blocks
-
MDEV-11633 Make the InnoDB system tablespace optional
-
- Open
-
-
MDEV-11655 Transactional data dictionary
-
- Open
-
-
MDEV-15140 Implement Partial / Filtered Indexes
-
- Open
-
-
MDEV-18518 Implement atomic multi-table (or multi-partition) CREATE TABLE for InnoDB
-
- Open
-
-
MDEV-23570 deprecate keep_files_on_create
-
- Open
-
- includes
-
MDEV-23842 Atomic RENAME TABLE
-
- In Review
-
-
MDEV-23844 Atomic DROP TABLE
-
- In Progress
-
-
MDEV-24395 Atomic DROP TRIGGER
-
- In Review
-
-
MDEV-24408 Atomic DROP DATABASE
-
- Open
-
-
MDEV-24576 Atomic CREATE TABLE
-
- In Review
-
-
MDEV-24607 ATOMIC CREATE VIEW
-
- In Review
-
-
MDEV-24746 Atomic CREATE TRIGGER
-
- In Review
-
- is blocked by
-
MDEV-20677 Renaming files may not be filesystem-crash-safe
-
- Open
-
-
MDEV-24589 DROP TABLE is not crash-safe
-
- Open
-
- is part of
-
MDEV-4259 transactional DDL
-
- Open
-
- relates to
-
MDEV-18518 Implement atomic multi-table (or multi-partition) CREATE TABLE for InnoDB
-
- Open
-
-
MDEV-22928 SUMMARY: AddressSanitizer: SEGV storage/innobase/include/dict0mem.h:1178 in dict_index_t::is_spatial() const
-
- Open
-
-
MDEV-23741 InnoDB: Table ... contains <n> indexes inside InnoDB, which is different from the number of indexes <n> defined in the MariaDB
-
- Closed
-
-
MDEV-24755 Rebase FK tasks on top of Atomic DDL
-
- Closed
-
-
MDEV-6642 Server crashed with assertion failure in file ha_innodb.cc line 8619
-
- Open
-
-
MDEV-11675 Lag Free Alter On Slave
-
- Confirmed
-
-
MDEV-16290 ALTER TABLE ... RENAME COLUMN syntax
-
- Closed
-
-
MDEV-16417 Store Foreign Key metadata outside of InnoDB
-
- In Review
-
-
MDEV-21053 Crash safety of foreign key DDL
-
- In Review
-
-
MDEV-22056 Rocks db corrupts data when disk is out of space
-
- Open
-