mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 19:41:47 +01:00
branches/zip: lock_table_other_has_incompatible():
Return an incompatible lock or NULL instead of TRUE or FALSE. Approved by Sunny over IM.
This commit is contained in:
parent
80ac9f4e4e
commit
d8840f931a
1 changed files with 5 additions and 4 deletions
|
@ -3753,9 +3753,10 @@ lock_table_enqueue_waiting(
|
|||
|
||||
/*********************************************************************//**
|
||||
Checks if other transactions have an incompatible mode lock request in
|
||||
the lock queue. */
|
||||
the lock queue.
|
||||
@return lock or NULL */
|
||||
UNIV_INLINE
|
||||
ibool
|
||||
lock_t*
|
||||
lock_table_other_has_incompatible(
|
||||
/*==============================*/
|
||||
trx_t* trx, /*!< in: transaction, or NULL if all
|
||||
|
@ -3777,13 +3778,13 @@ lock_table_other_has_incompatible(
|
|||
&& (!lock_mode_compatible(lock_get_mode(lock), mode))
|
||||
&& (wait || !(lock_get_wait(lock)))) {
|
||||
|
||||
return(TRUE);
|
||||
return(lock);
|
||||
}
|
||||
|
||||
lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock);
|
||||
}
|
||||
|
||||
return(FALSE);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/*********************************************************************//**
|
||||
|
|
Loading…
Add table
Reference in a new issue