diff options
Diffstat (limited to 'storage/innobase/sync/sync0sync.c')
-rw-r--r-- | storage/innobase/sync/sync0sync.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c index 944fd2a97fc..1099dff798e 100644 --- a/storage/innobase/sync/sync0sync.c +++ b/storage/innobase/sync/sync0sync.c @@ -641,7 +641,7 @@ mutex_set_debug_info( ut_ad(mutex); ut_ad(file_name); - sync_thread_add_level(mutex, mutex->level); + sync_thread_add_level(mutex, mutex->level, FALSE); mutex->file_name = file_name; mutex->line = line; @@ -1011,8 +1011,9 @@ void sync_thread_add_level( /*==================*/ void* latch, /* in: pointer to a mutex or an rw-lock */ - ulint level) /* in: level in the latching order; if + ulint level, /* in: level in the latching order; if SYNC_LEVEL_VARYING, nothing is done */ + ibool relock) /* in: TRUE if re-entering an x-lock */ { sync_level_t* array; sync_level_t* slot; @@ -1060,6 +1061,10 @@ sync_thread_add_level( array = thread_slot->levels; + if (relock) { + goto levels_ok; + } + /* NOTE that there is a problem with _NODE and _LEAF levels: if the B-tree height changes, then a leaf can change to an internal node or the other way around. We do not know at present if this can cause @@ -1209,6 +1214,7 @@ sync_thread_add_level( ut_error; } +levels_ok: for (i = 0; i < SYNC_THREAD_N_LEVELS; i++) { slot = sync_thread_levels_get_nth(array, i); |