~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/row/row0umod.c

  • Committer: Brian Aker
  • Date: 2010-12-18 10:14:05 UTC
  • mfrom: (2008.1.3 clean)
  • Revision ID: brian@tangent.org-20101218101405-qjbse29shi9coklg
Merge of user identifier work

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
some of its fields were changed. Now, it is possible that the delete marked
59
59
version has become obsolete at the time the undo is started. */
60
60
 
 
61
/*************************************************************************
 
62
IMPORTANT NOTE: Any operation that generates redo MUST check that there
 
63
is enough space in the redo log before for that operation. This is
 
64
done by calling log_free_check(). The reason for checking the
 
65
availability of the redo log space before the start of the operation is
 
66
that we MUST not hold any synchonization objects when performing the
 
67
check.
 
68
If you make a change in this module make sure that no codepath is
 
69
introduced where a call to log_free_check() is bypassed. */
 
70
 
61
71
/***********************************************************//**
62
72
Checks if also the previous version of the clustered index record was
63
73
modified or inserted by the same transaction, and its undo number is such
64
74
that it should be undone in the same rollback.
65
75
@return TRUE if also previous modify or insert of this row should be undone */
66
 
UNIV_INLINE
 
76
static
67
77
ibool
68
78
row_undo_mod_undo_also_prev_vers(
69
79
/*=============================*/
75
85
 
76
86
        trx = node->trx;
77
87
 
78
 
        if (0 != ut_dulint_cmp(node->new_trx_id, trx->id)) {
 
88
        if (node->new_trx_id != trx->id) {
79
89
 
80
 
                *undo_no = ut_dulint_zero;
 
90
                *undo_no = 0;
81
91
                return(FALSE);
82
92
        }
83
93
 
85
95
 
86
96
        *undo_no = trx_undo_rec_get_undo_no(undo_rec);
87
97
 
88
 
        return(ut_dulint_cmp(trx->roll_limit, *undo_no) <= 0);
 
98
        return(trx->roll_limit <= *undo_no);
89
99
}
90
100
 
91
101
/***********************************************************//**
104
114
        btr_pcur_t*     pcur;
105
115
        btr_cur_t*      btr_cur;
106
116
        ulint           err;
 
117
#ifdef UNIV_DEBUG
107
118
        ibool           success;
 
119
#endif /* UNIV_DEBUG */
108
120
 
109
121
        pcur = &(node->pcur);
110
122
        btr_cur = btr_pcur_get_btr_cur(pcur);
111
123
 
112
 
        success = btr_pcur_restore_position(mode, pcur, mtr);
 
124
#ifdef UNIV_DEBUG
 
125
        success =
 
126
#endif /* UNIV_DEBUG */
 
127
        btr_pcur_restore_position(mode, pcur, mtr);
113
128
 
114
129
        ut_ad(success);
115
130
 
231
246
 
232
247
        ut_ad(node && thr);
233
248
 
 
249
        log_free_check();
 
250
 
234
251
        /* Check if also the previous version of the clustered index record
235
252
        should be undone in this same rollback operation */
236
253
 
778
795
        dict_index_t*   clust_index;
779
796
        byte*           ptr;
780
797
        undo_no_t       undo_no;
781
 
        dulint          table_id;
 
798
        table_id_t      table_id;
782
799
        trx_id_t        trx_id;
783
800
        roll_ptr_t      roll_ptr;
784
801
        ulint           info_bits;