~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/lock/lock0iter.c

  • 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:
25
25
   bit_no is calculated in this function by using
26
26
   lock_rec_find_set_bit(). There is exactly one bit set in the bitmap
27
27
   of a wait lock. */
28
 
 
 
28
UNIV_INTERN
29
29
void
30
30
lock_queue_iterator_reset(
31
31
/*======================*/
32
32
        lock_queue_iterator_t*  iter,   /* out: iterator */
33
 
        lock_t*                 lock,   /* in: lock to start from */
 
33
        const lock_t*           lock,   /* in: lock to start from */
34
34
        ulint                   bit_no) /* in: record number in the
35
35
                                        heap */
36
36
{
41
41
                iter->bit_no = bit_no;
42
42
        } else {
43
43
 
44
 
                switch (lock_get_type(lock)) {
 
44
                switch (lock_get_type_low(lock)) {
45
45
                case LOCK_TABLE:
46
46
                        iter->bit_no = ULINT_UNDEFINED;
47
47
                        break;
59
59
Gets the previous lock in the lock queue, returns NULL if there are no
60
60
more locks (i.e. the current lock is the first one). The iterator is
61
61
receded (if not-NULL is returned). */
62
 
 
63
 
lock_t*
 
62
UNIV_INTERN
 
63
const lock_t*
64
64
lock_queue_iterator_get_prev(
65
65
/*=========================*/
66
66
                                        /* out: previous lock or NULL */
67
67
        lock_queue_iterator_t*  iter)   /* in/out: iterator */
68
68
{
69
 
        lock_t* prev_lock;
 
69
        const lock_t*   prev_lock;
70
70
 
71
 
        switch (lock_get_type(iter->current_lock)) {
 
71
        switch (lock_get_type_low(iter->current_lock)) {
72
72
        case LOCK_REC:
73
73
                prev_lock = lock_rec_get_prev(
74
74
                        iter->current_lock, iter->bit_no);