Commit d5c5fa38 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

refs #5679 grab exclusive MDL for drop index

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@49906 c7de825b-a66e-492c-adef-691d508d4ae1
parent cbea44ad
......@@ -209,6 +209,11 @@ ha_tokudb::check_if_supported_inplace_alter(TABLE *altered_table, Alter_inplace_
!tables_have_same_keys(table, altered_table, false, false) &&
is_disjoint_add_drop(ha_alter_info)) {
if (ctx->handler_flags & (Alter_inplace_info::DROP_INDEX + Alter_inplace_info::DROP_UNIQUE_INDEX)) {
// the fractal tree can not handle dropping an index concurrent with querying with the index.
// we grab an exclusive MDL for the drop index.
result = HA_ALTER_INPLACE_EXCLUSIVE_LOCK;
} else {
result = HA_ALTER_INPLACE_SHARED_LOCK;
// someday, allow multiple hot indexes via alter table add key. don't forget to change the store_lock function.
......@@ -219,6 +224,7 @@ ha_tokudb::check_if_supported_inplace_alter(TABLE *altered_table, Alter_inplace_
result = HA_ALTER_INPLACE_NO_LOCK;
}
}
}
} else
// column default
if (only_flags(ctx->handler_flags, Alter_inplace_info::ALTER_COLUMN_DEFAULT)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment