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
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
During prepare phase, if the table has no rows then InnoDB can take S-lock on the table
and skip the online alter phase. InnoDB can rely on {{stat_n_rows}} in {{dict_table_t}}. InnoDB doesn't have to rely on MDL. It can skip {{ha_innobase::inplace_alter_table()}} to avoid concurrent DML. It could reduce the time taken for DDL |
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. |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.5 [ 23123 ] |
Fix Version/s | 10.7 [ 24805 ] | |
Fix Version/s | 10.6 [ 24028 ] |
Fix Version/s | 10.8 [ 26121 ] | |
Fix Version/s | 10.7 [ 24805 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Fix Version/s | 10.8.0 [ 26800 ] | |
Fix Version/s | 10.4.23 [ 26807 ] | |
Fix Version/s | 10.5.14 [ 26809 ] | |
Fix Version/s | 10.6.6 [ 26811 ] | |
Fix Version/s | 10.7.2 [ 26813 ] | |
Fix Version/s | 10.8 [ 26121 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10002 ] | Closed [ 6 ] |
Link |
This issue relates to |
Link |
This issue relates to |
Workflow | MariaDB v3 [ 113792 ] | MariaDB v4 [ 134344 ] |
Link |
This issue causes |