~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/lock0lock.ic

  • Committer: Brian Aker
  • Date: 2008-10-28 08:36:02 UTC
  • mfrom: (520.4.13 merge-innodb-plugin)
  • Revision ID: brian@tangent.org-20081028083602-0p3zzlhlxr5q2sqo
Merging Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
/*=========================*/
60
60
                                /* out: transaction which has the x-lock, or
61
61
                                NULL */
62
 
        rec_t*          rec,    /* in: user record */
 
62
        const rec_t*    rec,    /* in: user record */
63
63
        dict_index_t*   index,  /* in: clustered index */
64
64
        const ulint*    offsets)/* in: rec_get_offsets(rec, index) */
65
65
{
66
66
        dulint  trx_id;
67
67
 
68
68
        ut_ad(mutex_own(&kernel_mutex));
69
 
        ut_ad(index->type & DICT_CLUSTERED);
 
69
        ut_ad(dict_index_is_clust(index));
70
70
        ut_ad(page_rec_is_user_rec(rec));
71
71
 
72
72
        trx_id = row_get_rec_trx_id(rec, index, offsets);
79
79
 
80
80
        return(NULL);
81
81
}
 
82
 
 
83
/*************************************************************************
 
84
Gets the heap_no of the smallest user record on a page. */
 
85
UNIV_INLINE
 
86
ulint
 
87
lock_get_min_heap_no(
 
88
/*=================*/
 
89
                                        /* out: heap_no of smallest
 
90
                                        user record, or
 
91
                                        PAGE_HEAP_NO_SUPREMUM */
 
92
        const buf_block_t*      block)  /* in: buffer block */
 
93
{
 
94
        const page_t*   page    = block->frame;
 
95
 
 
96
        if (page_is_comp(page)) {
 
97
                return(rec_get_heap_no_new(
 
98
                               page
 
99
                               + rec_get_next_offs(page + PAGE_NEW_INFIMUM,
 
100
                                                   TRUE)));
 
101
        } else {
 
102
                return(rec_get_heap_no_old(
 
103
                               page
 
104
                               + rec_get_next_offs(page + PAGE_OLD_INFIMUM,
 
105
                                                   FALSE)));
 
106
        }
 
107
}