~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/row0vers.h

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
Finds out if an active transaction has inserted or modified a secondary
23
23
index record. NOTE: the kernel mutex is temporarily released in this
24
24
function! */
25
 
 
 
25
UNIV_INTERN
26
26
trx_t*
27
27
row_vers_impl_x_locked_off_kernel(
28
28
/*==============================*/
29
29
                                /* out: NULL if committed, else the active
30
30
                                transaction; NOTE that the kernel mutex is
31
31
                                temporarily released! */
32
 
        rec_t*          rec,    /* in: record in a secondary index */
 
32
        const rec_t*    rec,    /* in: record in a secondary index */
33
33
        dict_index_t*   index,  /* in: the secondary index */
34
34
        const ulint*    offsets);/* in: rec_get_offsets(rec, index) */
35
35
/*********************************************************************
36
36
Finds out if we must preserve a delete marked earlier version of a clustered
37
37
index record, because it is >= the purge view. */
38
 
 
 
38
UNIV_INTERN
39
39
ibool
40
40
row_vers_must_preserve_del_marked(
41
41
/*==============================*/
49
49
if there is any not delete marked version of the record where the trx
50
50
id >= purge view, and the secondary index entry == ientry; exactly in
51
51
this case we return TRUE. */
52
 
 
 
52
UNIV_INTERN
53
53
ibool
54
54
row_vers_old_has_index_entry(
55
55
/*=========================*/
57
57
        ibool           also_curr,/* in: TRUE if also rec is included in the
58
58
                                versions to search; otherwise only versions
59
59
                                prior to it are searched */
60
 
        rec_t*          rec,    /* in: record in the clustered index; the
 
60
        const rec_t*    rec,    /* in: record in the clustered index; the
61
61
                                caller must have a latch on the page */
62
62
        mtr_t*          mtr,    /* in: mtr holding the latch on rec; it will
63
63
                                also hold the latch on purge_view */
64
64
        dict_index_t*   index,  /* in: the secondary index */
65
 
        dtuple_t*       ientry);        /* in: the secondary index entry */
 
65
        const dtuple_t* ientry);/* in: the secondary index entry */
66
66
/*********************************************************************
67
67
Constructs the version of a clustered index record which a consistent
68
68
read should see. We assume that the trx id stored in rec is such that
69
69
the consistent read should not see rec in its present version. */
70
 
 
 
70
UNIV_INTERN
71
71
ulint
72
72
row_vers_build_for_consistent_read(
73
73
/*===============================*/
74
74
                                /* out: DB_SUCCESS or DB_MISSING_HISTORY */
75
 
        rec_t*          rec,    /* in: record in a clustered index; the
 
75
        const rec_t*    rec,    /* in: record in a clustered index; the
76
76
                                caller must have a latch on the page; this
77
77
                                latch locks the top of the stack of versions
78
78
                                of this records */
85
85
        mem_heap_t**    offset_heap,/* in/out: memory heap from which
86
86
                                the offsets are allocated */
87
87
        mem_heap_t*     in_heap,/* in: memory heap from which the memory for
88
 
                                old_vers is allocated; memory for possible
 
88
                                *old_vers is allocated; memory for possible
89
89
                                intermediate versions is allocated and freed
90
90
                                locally within the function */
91
91
        rec_t**         old_vers);/* out, own: old version, or NULL if the
95
95
/*********************************************************************
96
96
Constructs the last committed version of a clustered index record,
97
97
which should be seen by a semi-consistent read. */
98
 
 
 
98
UNIV_INTERN
99
99
ulint
100
100
row_vers_build_for_semi_consistent_read(
101
101
/*====================================*/
102
102
                                /* out: DB_SUCCESS or DB_MISSING_HISTORY */
103
 
        rec_t*          rec,    /* in: record in a clustered index; the
 
103
        const rec_t*    rec,    /* in: record in a clustered index; the
104
104
                                caller must have a latch on the page; this
105
105
                                latch locks the top of the stack of versions
106
106
                                of this records */
111
111
        mem_heap_t**    offset_heap,/* in/out: memory heap from which
112
112
                                the offsets are allocated */
113
113
        mem_heap_t*     in_heap,/* in: memory heap from which the memory for
114
 
                                old_vers is allocated; memory for possible
 
114
                                *old_vers is allocated; memory for possible
115
115
                                intermediate versions is allocated and freed
116
116
                                locally within the function */
117
 
        rec_t**         old_vers);/* out, own: rec, old version, or NULL if the
 
117
        const rec_t**   old_vers);/* out: rec, old version, or NULL if the
118
118
                                record does not exist in the view, that is,
119
119
                                it was freshly inserted afterwards */
120
120