Commit 9da177c6 authored by Sergey Vojtovich's avatar Sergey Vojtovich

Applying InnoDB snapshot

Detailed revision comments:

r6660 | marko | 2010-02-11 11:21:11 +0200 (Thu, 11 Feb 2010) | 7 lines
branches/zip: Clarify the rollback of INSERT by UPDATE of delete-marked rec.

row_undo_mod_remove_clust_low(): Augment the function comment.

row_undo_mod_remove_clust_low(), row_undo_mod_del_mark_or_remove_sec_low(),
row_undo_mod_del_mark_or_remove_sec(), row_undo_mod_upd_del_sec():
Add ut_ad(node->rec_type == TRX_UNDO_UPD_DEL_REC);
parent a2c5231e
...@@ -144,6 +144,10 @@ row_undo_mod_clust_low( ...@@ -144,6 +144,10 @@ row_undo_mod_clust_low(
/***********************************************************//** /***********************************************************//**
Removes a clustered index record after undo if possible. Removes a clustered index record after undo if possible.
This is attempted when the record was inserted by updating a
delete-marked record and there no longer exist transactions
that would see the delete-marked record. In other words, we
roll back the insert by purging the record.
@return DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */ @return DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */
static static
ulint ulint
...@@ -159,6 +163,7 @@ row_undo_mod_remove_clust_low( ...@@ -159,6 +163,7 @@ row_undo_mod_remove_clust_low(
ulint err; ulint err;
ibool success; ibool success;
ut_ad(node->rec_type == TRX_UNDO_UPD_DEL_REC);
pcur = &(node->pcur); pcur = &(node->pcur);
btr_cur = btr_pcur_get_btr_cur(pcur); btr_cur = btr_pcur_get_btr_cur(pcur);
...@@ -316,6 +321,7 @@ row_undo_mod_del_mark_or_remove_sec_low( ...@@ -316,6 +321,7 @@ row_undo_mod_del_mark_or_remove_sec_low(
mtr_t mtr; mtr_t mtr;
mtr_t mtr_vers; mtr_t mtr_vers;
ut_ad(node->rec_type == TRX_UNDO_UPD_DEL_REC);
log_free_check(); log_free_check();
mtr_start(&mtr); mtr_start(&mtr);
...@@ -412,6 +418,8 @@ row_undo_mod_del_mark_or_remove_sec( ...@@ -412,6 +418,8 @@ row_undo_mod_del_mark_or_remove_sec(
{ {
ulint err; ulint err;
ut_ad(node->rec_type == TRX_UNDO_UPD_DEL_REC);
err = row_undo_mod_del_mark_or_remove_sec_low(node, thr, index, err = row_undo_mod_del_mark_or_remove_sec_low(node, thr, index,
entry, BTR_MODIFY_LEAF); entry, BTR_MODIFY_LEAF);
if (err == DB_SUCCESS) { if (err == DB_SUCCESS) {
...@@ -533,6 +541,7 @@ row_undo_mod_upd_del_sec( ...@@ -533,6 +541,7 @@ row_undo_mod_upd_del_sec(
dict_index_t* index; dict_index_t* index;
ulint err = DB_SUCCESS; ulint err = DB_SUCCESS;
ut_ad(node->rec_type == TRX_UNDO_UPD_DEL_REC);
heap = mem_heap_create(1024); heap = mem_heap_create(1024);
while (node->index != NULL) { while (node->index != NULL) {
......
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