Commit 838babad authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2952], do handlerton changes

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@24961 c7de825b-a66e-492c-adef-691d508d4ae1
parent 535fd098
...@@ -6662,6 +6662,13 @@ int ha_tokudb::prepare_drop_index(TABLE *table_arg, uint *key_num, uint num_of_k ...@@ -6662,6 +6662,13 @@ int ha_tokudb::prepare_drop_index(TABLE *table_arg, uint *key_num, uint num_of_k
error = db_env->txn_begin(db_env, 0, &txn, 0); error = db_env->txn_begin(db_env, 0, &txn, 0);
if (error) { goto cleanup; } if (error) { goto cleanup; }
for (uint i = 0; i < num_of_keys; i++) {
uint curr_index = key_num[i];
error = share->key_file[curr_index]->pre_acquire_fileops_lock(share->key_file[curr_index],txn);
if (error != 0) {
goto cleanup;
}
}
for (uint i = 0; i < num_of_keys; i++) { for (uint i = 0; i < num_of_keys; i++) {
uint curr_index = key_num[i]; uint curr_index = key_num[i];
int r = share->key_file[curr_index]->close(share->key_file[curr_index],0); int r = share->key_file[curr_index]->close(share->key_file[curr_index],0);
...@@ -6935,6 +6942,13 @@ int ha_tokudb::delete_all_rows() { ...@@ -6935,6 +6942,13 @@ int ha_tokudb::delete_all_rows() {
} }
curr_num_DBs = table->s->keys + test(hidden_primary_key); curr_num_DBs = table->s->keys + test(hidden_primary_key);
for (uint i = 0; i < curr_num_DBs; i++) {
error = share->key_file[i]->pre_acquire_fileops_lock(
share->key_file[i],
txn
);
if (error) { goto cleanup; }
}
for (uint i = 0; i < curr_num_DBs; i++) { for (uint i = 0; i < curr_num_DBs; i++) {
error = truncate_dictionary(i, txn); error = truncate_dictionary(i, txn);
if (error) { goto cleanup; } if (error) { goto cleanup; }
......
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