mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 19:41:47 +01:00
branches/zip: Fix a bug that was triggered during purge.
btr_compress(): Defer any tree modifications until the records have successfully been copied. row_purge_remove_sec_if_poss_low(): Simplify the setting of the return status.
This commit is contained in:
parent
d02cde9a66
commit
b92c487a76
2 changed files with 12 additions and 12 deletions
|
@ -2259,11 +2259,6 @@ btr_compress(
|
|||
}
|
||||
}
|
||||
|
||||
btr_search_drop_page_hash_index(page);
|
||||
|
||||
/* Remove the page from the level list */
|
||||
btr_level_list_remove(tree, page, mtr);
|
||||
|
||||
/* Move records to the merge page */
|
||||
if (is_left) {
|
||||
rec_t* orig_pred = page_rec_get_prev(
|
||||
|
@ -2276,6 +2271,11 @@ btr_compress(
|
|||
return(FALSE);
|
||||
}
|
||||
|
||||
btr_search_drop_page_hash_index(page);
|
||||
|
||||
/* Remove the page from the level list */
|
||||
btr_level_list_remove(tree, page, mtr);
|
||||
|
||||
btr_node_ptr_delete(tree, page, mtr);
|
||||
lock_update_merge_left(merge_page, orig_pred, page);
|
||||
} else {
|
||||
|
@ -2293,6 +2293,11 @@ btr_compress(
|
|||
return(FALSE);
|
||||
}
|
||||
|
||||
btr_search_drop_page_hash_index(page);
|
||||
|
||||
/* Remove the page from the level list */
|
||||
btr_level_list_remove(tree, page, mtr);
|
||||
|
||||
/* Replace the address of the old child node (= page) with the
|
||||
address of the merge page to the right */
|
||||
|
||||
|
|
|
@ -265,13 +265,8 @@ row_purge_remove_sec_if_poss_low(
|
|||
ut_ad(mode == BTR_MODIFY_TREE);
|
||||
btr_cur_pessimistic_delete(&err, FALSE, btr_cur,
|
||||
FALSE, &mtr);
|
||||
if (err == DB_SUCCESS) {
|
||||
success = TRUE;
|
||||
} else if (err == DB_OUT_OF_FILE_SPACE) {
|
||||
success = FALSE;
|
||||
} else {
|
||||
ut_error;
|
||||
}
|
||||
success = err == DB_SUCCESS;
|
||||
ut_a(success || err == DB_OUT_OF_FILE_SPACE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue