1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-30 11:22:14 +03:00

Applying InnoDB snapshot

Detailed revision comments:

r6449 | marko | 2010-01-13 22:38:53 +0200 (Wed, 13 Jan 2010) | 18 lines
branches/zip: lock_rec_validate_page(): Only validate the record
queues when the thread is not holding a space->latch.

When UNIV_DEBUG is defined while UNIV_SYNC_DEBUG is not,
latching order violations will still occur and deadlocks will be possible.

sync_thread_levels_nonempty_gen(): Renamed from
sync_thread_levels_empty_gen().  Return the violating latch or NULL
instead of FALSE or TRUE, except that there will be a ut_error before
the non-NULL return.

sync_thread_levels_empty_gen(): A macro that negates the return value of
sync_thread_levels_nonempty_gen().

sync_thread_levels_contains(): New function, based on
sync_thread_levels_nonempty_gen().

This should fix Issue #441.
This commit is contained in:
Sergey Vojtovich
2010-04-01 15:22:07 +04:00
parent fb454deccd
commit cd7d82f2e3
3 changed files with 82 additions and 14 deletions

View File

@@ -238,16 +238,27 @@ ibool
sync_thread_levels_empty(void);
/*==========================*/
/******************************************************************//**
Checks that the level array for the current thread is empty.
@return TRUE if empty except the exceptions specified below */
Checks if the level array for the current thread contains a
mutex or rw-latch at the specified level.
@return a matching latch, or NULL if not found */
UNIV_INTERN
ibool
sync_thread_levels_empty_gen(
/*=========================*/
void*
sync_thread_levels_contains(
/*========================*/
ulint level); /*!< in: latching order level
(SYNC_DICT, ...)*/
/******************************************************************//**
Checks if the level array for the current thread is empty.
@return a latch, or NULL if empty except the exceptions specified below */
UNIV_INTERN
void*
sync_thread_levels_nonempty_gen(
/*============================*/
ibool dict_mutex_allowed); /*!< in: TRUE if dictionary mutex is
allowed to be owned by the thread,
also purge_is_running mutex is
allowed */
#define sync_thread_levels_empty_gen(d) (!sync_thread_levels_nonempty_gen(d))
/******************************************************************//**
Gets the debug information for a reserved mutex. */
UNIV_INTERN