summaryrefslogtreecommitdiff
path: root/storage/tokudb/ha_tokudb_alter_56.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/tokudb/ha_tokudb_alter_56.cc')
-rw-r--r--storage/tokudb/ha_tokudb_alter_56.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/tokudb/ha_tokudb_alter_56.cc b/storage/tokudb/ha_tokudb_alter_56.cc
index 1a03dc815a1..cae50446fa0 100644
--- a/storage/tokudb/ha_tokudb_alter_56.cc
+++ b/storage/tokudb/ha_tokudb_alter_56.cc
@@ -765,7 +765,9 @@ bool ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_i
#else
THD::killed_state saved_killed_state = thd->killed;
thd->killed = THD::NOT_KILLED;
- for (volatile uint i = 0; wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED); i++) {
+ // MySQL does not handle HA_EXTRA_NOT_USED so we use HA_EXTRA_PREPARE_FOR_RENAME since it is passed through
+ // the partition storage engine and is treated as a NOP by tokudb
+ for (volatile uint i = 0; wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_RENAME); i++) {
if (thd->killed != THD::NOT_KILLED)
thd->killed = THD::NOT_KILLED;
sleep(1);