mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
#3144 merge ::add_index cleanup bug fix to main refs[t:3144]
git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@26775 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
bf8c52f438
commit
686055447d
1 changed files with 14 additions and 0 deletions
|
@ -195,6 +195,7 @@ void free_key_and_col_info (KEY_AND_COL_INFO* kc_info) {
|
||||||
|
|
||||||
for (uint i = 0; i < MAX_KEY+1; i++) {
|
for (uint i = 0; i < MAX_KEY+1; i++) {
|
||||||
my_free(kc_info->cp_info[i], MYF(MY_ALLOW_ZERO_PTR));
|
my_free(kc_info->cp_info[i], MYF(MY_ALLOW_ZERO_PTR));
|
||||||
|
kc_info->cp_info[i] = NULL; // 3144
|
||||||
}
|
}
|
||||||
|
|
||||||
my_free(kc_info->field_lengths, MYF(MY_ALLOW_ZERO_PTR));
|
my_free(kc_info->field_lengths, MYF(MY_ALLOW_ZERO_PTR));
|
||||||
|
@ -1419,6 +1420,14 @@ exit:
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// reset the kc_info state at keynr
|
||||||
|
static void reset_key_and_col_info(KEY_AND_COL_INFO *kc_info, uint keynr) {
|
||||||
|
bitmap_clear_all(&kc_info->key_filters[keynr]);
|
||||||
|
my_free(kc_info->cp_info[keynr], MYF(MY_ALLOW_ZERO_PTR));
|
||||||
|
kc_info->cp_info[keynr] = NULL;
|
||||||
|
kc_info->mcp_info[keynr] = (MULTI_COL_PACK_INFO) { 0, 0 };
|
||||||
|
}
|
||||||
|
|
||||||
int initialize_key_and_col_info(TABLE_SHARE* table_share, TABLE* table, KEY_AND_COL_INFO* kc_info, uint hidden_primary_key, uint primary_key) {
|
int initialize_key_and_col_info(TABLE_SHARE* table_share, TABLE* table, KEY_AND_COL_INFO* kc_info, uint hidden_primary_key, uint primary_key) {
|
||||||
int error = 0;
|
int error = 0;
|
||||||
u_int32_t curr_blob_field_index = 0;
|
u_int32_t curr_blob_field_index = 0;
|
||||||
|
@ -6805,6 +6814,11 @@ cleanup:
|
||||||
thd_proc_info(thd, status_msg);
|
thd_proc_info(thd, status_msg);
|
||||||
indexer->abort(indexer);
|
indexer->abort(indexer);
|
||||||
}
|
}
|
||||||
|
if (error) { // 3144
|
||||||
|
curr_index = curr_num_DBs;
|
||||||
|
for (uint i = 0; i < num_of_keys; i++, curr_index++)
|
||||||
|
reset_key_and_col_info(&share->kc_info, curr_index);
|
||||||
|
}
|
||||||
if (txn) {
|
if (txn) {
|
||||||
if (error) {
|
if (error) {
|
||||||
curr_index = curr_num_DBs;
|
curr_index = curr_num_DBs;
|
||||||
|
|
Loading…
Reference in a new issue