InnoDB Plugin  1.0
Data Structures | Functions
lock0priv.h File Reference
#include "univ.i"
#include "dict0types.h"
#include "hash0hash.h"
#include "trx0types.h"
#include "ut0lst.h"
#include "lock0priv.ic"
Include dependency graph for lock0priv.h:

Go to the source code of this file.

Data Structures

struct  lock_table_t
struct  lock_rec_t
struct  lock_t

Functions

UNIV_INLINE ulint lock_get_type_low (const lock_t *lock)
UNIV_INTERN const lock_tlock_rec_get_prev (const lock_t *in_lock, ulint heap_no)
UNIV_INTERN void lock_cancel_waiting_and_release (lock_t *lock)
UNIV_INLINE trx_id_t lock_clust_rec_some_has_impl (const rec_t *rec, const dict_index_t *index, const ulint *offsets))

Detailed Description

Lock module internal structures and methods.

Created July 12, 2007 Vasil Dimov

Function Documentation

UNIV_INTERN void lock_cancel_waiting_and_release ( lock_t lock)

Cancels a waiting lock request and releases possible other transactions waiting behind it. in/out: waiting lock request

UNIV_INLINE trx_id_t lock_clust_rec_some_has_impl ( const rec_t *  rec,
const dict_index_t index,
const ulint *  offsets 
)

Checks if some transaction has an implicit x-lock on a record in a clustered index.

Returns
transaction id of the transaction which has the x-lock, or 0
Parameters
recin: user record
indexin: clustered index
offsetsin: rec_get_offsets(rec, index)
UNIV_INLINE ulint lock_get_type_low ( const lock_t lock)

Gets the type of a lock.

Returns
LOCK_TABLE or LOCK_REC in: lock

Gets the type of a lock.

Returns
LOCK_TABLE or LOCK_REC
Parameters
lockin: lock
UNIV_INTERN const lock_t* lock_rec_get_prev ( const lock_t in_lock,
ulint  heap_no 
)

Gets the previous record lock set on a record.

Returns
previous lock on the same record, NULL if none exists in: heap number of the record
Parameters
in_lockin: record lock