This lesson should have been learned with the CREATE TABLE of death, but it is worth a refresh.
Do not uselessly grant CREATE and ALTER TABLE
The reason I am posting this reminder is that another crashing bug related to DDL came to my attention. This bug is only fixed in a recent version of MySQL (probably not affecting 5.6 and 5.7), so if you are running the latest 8.0 or 8.4, you should
Do not uselessly grant CREATE and ALTER TABLE appeared first on MariaDB.org
This lesson should have been learned with the CREATE TABLE of death, but it is worth a refresh.
Do not uselessly grant CREATE and ALTER TABLE
The reason I am posting this reminder is that another crashing bug related to DDL came to my attention. This bug is only fixed in a recent version of MySQL (probably not affecting 5.6 and 5.7), so if you are running the latest 8.0 or 8.4, you should be fine. I am not sharing the detail, I might in the future (like I did for the CREATE TABLE of death). For triggering it, one need CREATE and ALTER TABLE.
The even more scary thing about this bug / crash is that it is also triggered by a rollback. So after the crash, when MySQL attempts crash recovery, it crashes again when rolling-back uncommitted transaction. There might still be a way to recover data with innodb_force_recovery, but it would compromise atomicity and is probably a big hurdle. In this respect, in addition to being a crashing bug, it can be considered a data corruption bug.
A crash in rollback is non-trivial to recover
I gave a talk about a similar situation at SRECon: Autopsy of a Cascading Outage from a MySQL Crashing Bug. The slides are self-contained and were appreciated. If you face this or a similar situation, I hope you have a good backup and can replay binlogs (maybe it is also good time to test backups and binlog replay).
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Symlinks are Unsafe since MySQL 8.0.39 (and maybe even before) | 0 | 8.23 | 14-04-2026 |
| 2 | Impressed by Disabling InnoDB Redo Logging for Creating Tables as Fast as Possible | 0 | 5.06 | 28-10-2024 |
| 3 | MySQL 8.0.17 GTID Crash Safety Improvement | 0 | 9.21 | 04-08-2026 |
| 4 | Long and Silent / Stressful MySQL Startup with Many Tables | 0 | 5.19 | 11-11-2024 |
| 5 | Faster MySQL Startup with Many Tables (1M+) | 0 | 10.9 | 03-09-2024 |
| 6 | Understanding InnoDB Tablespace Duplicate Check (MySQL Startup with Many Tables) | 0 | 4.76 | 19-11-2024 |
| 7 | More than Flushing (also Caching) for innodb_flush_method, and Missing Release Candidate | 0 | 5.4 | 25-02-2026 |
| 8 | Lessons From 20 Years Hacking MySQL (Part 1) | 0 | 13.63 | 20-06-2024 |
| 9 | Impact of innodb_file_per_table Option On Crash Recovery Time | 0 | 8.09 | 23-07-2019 |
| 10 | Possibly a bug | 0 | 14.42 | 17-06-2024 |