drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
lock0iter.h File Reference
#include "univ.i"
#include "lock0types.h"
Include dependency graph for lock0iter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lock_queue_iterator_struct

Typedefs

typedef struct lock_queue_iterator_struct lock_queue_iterator_t

Functions

UNIV_INTERN void lock_queue_iterator_reset (lock_queue_iterator_t *iter, const lock_t *lock, ulint bit_no)
const lock_t * lock_queue_iterator_get_prev (lock_queue_iterator_t *iter)

Detailed Description

Lock queue iterator type and function prototypes.

Created July 16, 2007 Vasil Dimov

Definition in file lock0iter.h.

Macro Definition Documentation

◆ lock0iter_h

#define lock0iter_h

Definition at line 28 of file lock0iter.h.

Function Documentation

◆ lock_queue_iterator_get_prev()

const lock_t * lock_queue_iterator_get_prev ( lock_queue_iterator_t * iter)

Gets the previous lock in the lock queue, returns NULL if there are no more locks (i.e. the current lock is the first one). The iterator is receded (if not-NULL is returned).

Returns
previous lock or NULL in/out: iterator

Gets the previous lock in the lock queue, returns NULL if there are no more locks (i.e. the current lock is the first one). The iterator is receded (if not-NULL is returned).

Returns
previous lock or NULL
Parameters
iterin/out: iterator

Definition at line 87 of file lock0iter.cc.

◆ lock_queue_iterator_reset()

UNIV_INTERN void lock_queue_iterator_reset ( lock_queue_iterator_t * iter,
const lock_t * lock,
ulint bit_no )

Initialize lock queue iterator so that it starts to iterate from "lock". bit_no specifies the record number within the heap where the record is stored. It can be undefined (ULINT_UNDEFINED) in two cases:

  1. If the lock is a table lock, thus we have a table lock queue;
  2. If the lock is a record lock and it is a wait lock. In this case bit_no is calculated in this function by using lock_rec_find_set_bit(). There is exactly one bit set in the bitmap of a wait lock. in: record number in the heap

Initialize lock queue iterator so that it starts to iterate from "lock". bit_no specifies the record number within the heap where the record is stored. It can be undefined (ULINT_UNDEFINED) in two cases:

  1. If the lock is a table lock, thus we have a table lock queue;
  2. If the lock is a record lock and it is a wait lock. In this case bit_no is calculated in this function by using lock_rec_find_set_bit(). There is exactly one bit set in the bitmap of a wait lock.
Parameters
iterout: iterator
lockin: lock to start from
bit_noin: record number in the heap

Definition at line 50 of file lock0iter.cc.