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:
marko 2010-02-17 09:48:34 +00:00
parent 80ac9f4e4e
commit d8840f931a

View file

@ -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);
}
/*********************************************************************//**