summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2021-11-09 16:26:29 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2021-11-09 16:28:12 +0530
commit370eb8ff7d7fccdffbf13bf690bb8aaaaf72352d (patch)
treeb8beddb05d1f23c95c805d825f266784b8718aa2 /sql/handler.cc
parent06988bdcaa2d1af2c178c199b7f65dbafda45a2c (diff)
downloadmariadb-git-bb-10.7-MDEV-23805.tar.gz
MDEV-23805 Make Online DDL to Instant DDL when table is emptybb-10.7-MDEV-23805
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
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 57992d98c04..90b155f11d8 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -5268,7 +5268,8 @@ Alter_inplace_info::Alter_inplace_info(HA_CREATE_INFO *create_info_arg,
rename_keys(current_thd->mem_root),
modified_part_info(modified_part_info_arg),
ignore(ignore_arg),
- error_if_not_empty(error_non_empty)
+ error_if_not_empty(error_non_empty),
+ no_downgrade_if_empty(false)
{}
void Alter_inplace_info::report_unsupported_error(const char *not_supported,