/*********************************************************************//**
Acquire a predicate lock on a block
@return DB_SUCCESS, DB_LOCK_WAIT, or DB_DEADLOCK */
dberr_t
lock_prdt_lock( /*===========*/
buf_block_t* block, /*!< in/out: buffer block of rec */
lock_prdt_t* prdt, /*!< in: Predicate for the lock */
dict_index_t* index, /*!< in: secondary index */ enum lock_mode mode, /*!< in: mode of the lock which thereadcursorshouldseton records:LOCK_SorLOCK_X;the latterispossiblein
SELECT FOR UPDATE */ unsigned type_mode, /*!< in: LOCK_PREDICATE or LOCK_PRDT_PAGE */
que_thr_t* thr); /*!< in: query thread
(can be NULL if BTR_NO_LOCKING_FLAG) */
/*********************************************************************//**
Acquire a "Page" lock on a block
@return DB_SUCCESS, DB_LOCK_WAIT, or DB_DEADLOCK */
dberr_t
lock_place_prdt_page_lock( const page_id_t page_id, /*!< in: page identifier */
dict_index_t* index, /*!< in: secondary index */
que_thr_t* thr); /*!< in: query thread */
/*********************************************************************//**
Initiate a Predicate lock from a MBR */ void
lock_init_prdt_from_mbr( /*====================*/
lock_prdt_t* prdt, /*!< in/out: predicate to initialized */
rtr_mbr_t* mbr, /*!< in: Minimum Bounding Rectangle */
ulint mode, /*!< in: Search mode */
mem_heap_t* heap); /*!< in: heap for allocating memory */
/*********************************************************************//**
Get predicate lock's minimum bounding box
@return the minimum bounding box*/
lock_prdt_t*
lock_get_prdt_from_lock( /*====================*/ const lock_t* lock); /*!< in: the lock */
/*********************************************************************//**
Checks if a predicate lock request for a new lock has to wait for
request lock2.
@returntrueifnew lock has to wait for lock2 to be removed */ bool
lock_prdt_has_to_wait( /*==================*/ const trx_t* trx, /*!< in: trx of new lock */ unsigned type_mode,/*!< in: precise mode of the new lock toset:LOCK_SorLOCK_X,possibly ORedtoLOCK_PREDICATEorLOCK_PRDT_PAGE,
LOCK_INSERT_INTENTION */
lock_prdt_t* prdt, /*!< in: lock predicate to check */ const lock_t* lock2); /*!< in: another record lock; NOTE that itisassumedthatthishasalockbit setonthesamerecordasinthenew
lock we are setting */
/**************************************************************//**
Update predicate lock when page splits */ void
lock_prdt_update_split( /*===================*/
buf_block_t* new_block, /*!< in/out: the new half page */
lock_prdt_t* prdt, /*!< in: MBR on the old page */
lock_prdt_t* new_prdt, /*!< in: MBR on the new page */ const page_id_t page_id); /*!< in: page number */
/**************************************************************//**
Adjust locks from an ancestor page of Rtree on the appropriate level . */ void
lock_prdt_update_parent( /*====================*/
buf_block_t* left_block, /*!< in/out: page to be split */
buf_block_t* right_block, /*!< in/out: the new half page */
lock_prdt_t* left_prdt, /*!< in: MBR on the old page */
lock_prdt_t* right_prdt, /*!< in: MBR on the new page */ const page_id_t page_id); /*!< in: parent page */
/*********************************************************************//**
Checks if locks of other transactions prevent an immediate insert of
a predicate record.
@return DB_SUCCESS, DB_LOCK_WAIT, or DB_DEADLOCK */
dberr_t
lock_prdt_insert_check_and_lock( /*============================*/ const rec_t* rec, /*!< in: record after which to insert */
buf_block_t* block, /*!< in/out: buffer block of rec */
dict_index_t* index, /*!< in: index */
que_thr_t* thr, /*!< in: query thread */
mtr_t* mtr, /*!< in/out: mini-transaction */
lock_prdt_t* prdt); /*!< in: Minimum Bound Rectangle */
/*********************************************************************//**
Append a predicate to the lock */ void
lock_prdt_set_prdt( /*===============*/
lock_t* lock, /*!< in: lock */ const lock_prdt_t* prdt); /*!< in: Predicate */
#if0
/*********************************************************************//**
Checks if a predicate lock request for a new lock has to wait for
request lock2.
@returntrueifnew lock has to wait for lock2 to be removed */
UNIV_INLINE bool
lock_prdt_has_to_wait( /*==================*/ const trx_t* trx, /*!< in: trx of new lock */ unsigned type_mode,/*!< in: precise mode of the new lock toset:LOCK_SorLOCK_X,possibly ORedtoLOCK_PREDICATEorLOCK_PRDT_PAGE,
LOCK_INSERT_INTENTION */
lock_prdt_t* prdt, /*!< in: lock predicate to check */ const lock_t* lock2); /*!< in: another record lock; NOTE that itisassumedthatthishasalockbit setonthesamerecordasinthenew
lock we are setting */
/*********************************************************************//**
Get predicate lock's minimum bounding box
@return the minimum bounding box*/
UNIV_INLINE
rtr_mbr_t*
prdt_get_mbr_from_prdt( /*===================*/ const lock_prdt_t* prdt); /*!< in: the lock predicate */
#endif /*************************************************************//**
Moves the locks of a record to another record and resets the lock bits of
the donating record. */ void
lock_prdt_rec_move( /*===============*/ const buf_block_t* receiver, /*!< in: buffer block containing
the receiving record */ const page_id_t donator); /*!< in: target page */
/** Check whether there are R-tree Page lock on a page @param[in]trxtrxtotestthelock @param[in]page_idpageidentifier
@return true if there is none */ bool lock_test_prdt_page_lock(const trx_t *trx, const page_id_t page_id);
#endif
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.14Bemerkung:
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.