diff options
author | unknown <knielsen@knielsen-hq.org> | 2009-11-13 22:26:08 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2009-11-13 22:26:08 +0100 |
commit | 898f6f48b79d1f2c334fb559225b2b0fade5ea93 (patch) | |
tree | 84df8eecd942b650f172cbd67050ee8984c0d52b /storage/xtradb/include/lock0lock.ic | |
parent | 275c0a7f96502b33f763fb9388dcc1c289e4792b (diff) | |
parent | 2bde0c5e6d31583e5197e3b513f572a693161f62 (diff) | |
download | mariadb-git-898f6f48b79d1f2c334fb559225b2b0fade5ea93.tar.gz |
Merge XtraDB 8 into MariaDB.
Diffstat (limited to 'storage/xtradb/include/lock0lock.ic')
-rw-r--r-- | storage/xtradb/include/lock0lock.ic | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/storage/xtradb/include/lock0lock.ic b/storage/xtradb/include/lock0lock.ic index f978cc70678..014722f51c4 100644 --- a/storage/xtradb/include/lock0lock.ic +++ b/storage/xtradb/include/lock0lock.ic @@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA *****************************************************************************/ -/****************************************************** +/**************************************************//** +@file include/lock0lock.ic The transaction lock system Created 5/7/1996 Heikki Tuuri @@ -37,49 +38,48 @@ Created 5/7/1996 Heikki Tuuri #include "read0read.h" #include "log0recv.h" -/************************************************************************* +/*********************************************************************//** Calculates the fold value of a page file address: used in inserting or -searching for a lock in the hash table. */ +searching for a lock in the hash table. +@return folded value */ UNIV_INLINE ulint lock_rec_fold( /*==========*/ - /* out: folded value */ - ulint space, /* in: space */ - ulint page_no)/* in: page number */ + ulint space, /*!< in: space */ + ulint page_no)/*!< in: page number */ { return(ut_fold_ulint_pair(space, page_no)); } -/************************************************************************* +/*********************************************************************//** Calculates the hash value of a page file address: used in inserting or -searching for a lock in the hash table. */ +searching for a lock in the hash table. +@return hashed value */ UNIV_INLINE ulint lock_rec_hash( /*==========*/ - /* out: hashed value */ - ulint space, /* in: space */ - ulint page_no)/* in: page number */ + ulint space, /*!< in: space */ + ulint page_no)/*!< in: page number */ { return(hash_calc_hash(lock_rec_fold(space, page_no), lock_sys->rec_hash)); } -/************************************************************************* +/*********************************************************************//** Checks if some transaction has an implicit x-lock on a record in a clustered -index. */ +index. +@return transaction which has the x-lock, or NULL */ UNIV_INLINE trx_t* lock_clust_rec_some_has_impl( /*=========================*/ - /* out: transaction which has the x-lock, or - NULL */ - const rec_t* rec, /* in: user record */ - dict_index_t* index, /* in: clustered index */ - const ulint* offsets)/* in: rec_get_offsets(rec, index) */ + const rec_t* rec, /*!< in: user record */ + dict_index_t* index, /*!< in: clustered index */ + const ulint* offsets)/*!< in: rec_get_offsets(rec, index) */ { - dulint trx_id; + trx_id_t trx_id; ut_ad(mutex_own(&kernel_mutex)); ut_ad(dict_index_is_clust(index)); @@ -96,16 +96,14 @@ lock_clust_rec_some_has_impl( return(NULL); } -/************************************************************************* -Gets the heap_no of the smallest user record on a page. */ +/*********************************************************************//** +Gets the heap_no of the smallest user record on a page. +@return heap_no of smallest user record, or PAGE_HEAP_NO_SUPREMUM */ UNIV_INLINE ulint lock_get_min_heap_no( /*=================*/ - /* out: heap_no of smallest - user record, or - PAGE_HEAP_NO_SUPREMUM */ - const buf_block_t* block) /* in: buffer block */ + const buf_block_t* block) /*!< in: buffer block */ { const page_t* page = block->frame; |