Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
During prepare phase ha_innobase::prepare_inplace_alter_table() can check whether the table is empty and if it is then it can take S-lock on the
innodb table. So it eventually blocks concurrent DML to happen on the table. Skip the online alter phase and avoid the old table clustered index
read. InnoDB can rely on stat_n_rows in dict_table_t to find the table emptiness. InnoDB doesn't have to rely on MDL if relies on InnoDB lock.
InnoDB could reduce the time taken for DDL if table is empty.
Attachments
Issue Links
- causes
-
MDEV-27962 Instant DDL downgrades the MDL when table is empty
- Closed
- relates to
-
MDEV-16131 Assertion `is_instant() || id == DICT_INDEXES_ID' failed in dict_index_t::instant_field_value
- Closed
-
MDEV-24730 Corruption in online ALTER TABLE with ROW_FORMAT=REDUNDANT
- Closed
-
MDEV-515 innodb bulk insert
- Closed