Commit d8840f93 authored by marko's avatar marko

branches/zip: lock_table_other_has_incompatible():

Return an incompatible lock or NULL instead of TRUE or FALSE.
Approved by Sunny over IM.
parent 80ac9f4e
...@@ -3753,9 +3753,10 @@ lock_table_enqueue_waiting( ...@@ -3753,9 +3753,10 @@ lock_table_enqueue_waiting(
/*********************************************************************//** /*********************************************************************//**
Checks if other transactions have an incompatible mode lock request in Checks if other transactions have an incompatible mode lock request in
the lock queue. */ the lock queue.
@return lock or NULL */
UNIV_INLINE UNIV_INLINE
ibool lock_t*
lock_table_other_has_incompatible( lock_table_other_has_incompatible(
/*==============================*/ /*==============================*/
trx_t* trx, /*!< in: transaction, or NULL if all trx_t* trx, /*!< in: transaction, or NULL if all
...@@ -3777,13 +3778,13 @@ lock_table_other_has_incompatible( ...@@ -3777,13 +3778,13 @@ lock_table_other_has_incompatible(
&& (!lock_mode_compatible(lock_get_mode(lock), mode)) && (!lock_mode_compatible(lock_get_mode(lock), mode))
&& (wait || !(lock_get_wait(lock)))) { && (wait || !(lock_get_wait(lock)))) {
return(TRUE); return(lock);
} }
lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock); lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock);
} }
return(FALSE); return(NULL);
} }
/*********************************************************************//** /*********************************************************************//**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment