diff options
author | Rich Prohaska <prohaska@tokutek.com> | 2014-12-21 19:15:39 -0500 |
---|---|---|
committer | Rich Prohaska <prohaska@tokutek.com> | 2014-12-21 19:15:39 -0500 |
commit | b9d154c564c0669f4ba487c002df2190d111e434 (patch) | |
tree | 333f2e891fd79c8ddf097731e89b4f9428431923 /storage | |
parent | 09f905c57adcefe58cc1d5286551ccee3084ef93 (diff) | |
download | mariadb-git-b9d154c564c0669f4ba487c002df2190d111e434.tar.gz |
DB-766 use an extra flag that is supported on MySQL and does not require a tokutek patch to the wait_while_table_is_used function
Diffstat (limited to 'storage')
-rw-r--r-- | storage/tokudb/ha_tokudb.cc | 1 | ||||
-rw-r--r-- | storage/tokudb/ha_tokudb_alter_56.cc | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 578b6c01856..07046fd6340 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -5981,6 +5981,7 @@ int ha_tokudb::extra(enum ha_extra_function operation) { using_ignore_no_key = false; break; case HA_EXTRA_NOT_USED: + case HA_EXTRA_PREPARE_FOR_RENAME: break; // must do nothing and return 0 default: break; 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); |