1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-23805 Make Online DDL to Instant DDL when table is empty

- In ha_innobase::prepare_inplace_alter_table(), InnoDB should
check whether the table is empty. If the table is empty then
server should avoid downgrading the MDL after prepare phase.
It is more like instant alter, does change only in dicationary
and metadata.

- Changed few debug test case to make non-empty DDL table
This commit is contained in:
Thirunarayanan Balathandayuthapani
2021-11-12 17:46:35 +05:30
parent c5380c30b5
commit d270525dfd
23 changed files with 73 additions and 13 deletions

View File

@ -2493,6 +2493,9 @@ public:
/** true when InnoDB should abort the alter when table is not empty */
bool error_if_not_empty;
/** True when DDL should avoid downgrading the MDL */
bool mdl_exclusive_after_prepare= false;
Alter_inplace_info(HA_CREATE_INFO *create_info_arg,
Alter_info *alter_info_arg,
KEY *key_info_arg, uint key_count_arg,