1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
Thirunarayanan Balathandayuthapani 59d827bad7 MDEV-41494 Server aborts on crash recovery after an interrupted instant ALTER TABLE reorders/drops columns
Problem:
========
  After an instant ALTER TABLE that reorders or drops columns,
innobase_instant_try() deletes/updates SYS_COLUMNS, SYS_VIRTUAL
and SYS_TABLES.N_COLS, and only afterwards writes the hidden
metadata record that describes the old column layout in the
clustered index. These are separate mini-transactions within
the same DDL transaction.

If the server is killed after the SYS_COLUMNS/SYS_TABLES updates
were made durable but before the metadata record was written,
and recovery does not roll back the transaction then
table's dictionary definition and its on-disk metadata record go out
of sync.

On the next load, btr_cur_instant_init_low() correctly
detects this as "missing instant ALTER metadata" or "contains
unrecognizable instant ALTER metadata" and sets table->corrupted,
but it did not set table->file_unreadable. Since
dict_table_t::is_readable() only tests file_unreadable, the table
was left in an inconsistent corrupted-but-readable state.

Solution:
=========
btr_cur_instant_init_low(): Also set index->table->file_unreadable
in the "missing instant ALTER metadata" and "incompatible instant
ALTER metadata" error paths, consistent with every other corruption
path in this function.
2026-10-13 12:16:30 +05:30
..
2026-08-19 08:13:54 +02:00
2026-08-19 08:13:54 +02:00
2026-03-11 09:06:05 +02:00
2026-07-23 11:12:27 +02:00
2026-08-19 08:13:54 +02:00
2024-11-29 12:37:46 +02:00
2024-06-24 13:09:47 +03:00