[MDEV-24408] Crash-safe DROP DATABASE Created: 2020-12-15 Updated: 2022-11-01 Resolved: 2021-05-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Create Table |
| Fix Version/s: | 10.6.1 |
| Type: | Task | Priority: | Critical |
| Reporter: | Michael Widenius | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
The purpose of this task is to ensure that DROP DATABASE is crash safe. This means that if the server is killed during drop database crashes , the database and binary log will be consistent when the server has done engine and ddl recovery. For this particular project, we will ensure that every executed DROP TABLE is atomic and will be logged to the binary log. This is the same behaviour that we have with multi-table DROP TABLE. Description of how the current task should work:
This is in line of how things are now (minus ddl logging) except that On recovery we have to ensure that all dropped tables are logged in Recovery of active drop database ddl log entry:
|
| Comments |
| Comment by Marko Mäkelä [ 2021-05-17 ] |
|
I feel that handlerton::drop_database is largely redundant after However, in a future implementation of atomic or transactional DROP DATABASE, the simplified InnoDB implementation of handlerton::drop_database could come in handy. The operation probably should be two-phase: first check with each storage engine that the operation would succeed, and then commit to performing it. |