Commit c6d47e6e authored by unknown's avatar unknown

Bug#12980094 and Bug#13034534

Bug 12980094 - ASSERTION IN INNODB DETECTED IN RQG_PARTITION_DDL
Bug 13034534 - RQG TESTS FAIL ON WINDOWS WITH CRASH NEAR RW_LOCK_DEBUG_PRINT

All access to struct rw_lock_debug_struct must be protected by rw_lock_debug_mutex_enter().
parent ffd0a785
...@@ -484,7 +484,8 @@ struct rw_lock_struct { ...@@ -484,7 +484,8 @@ struct rw_lock_struct {
#define RW_LOCK_MAGIC_N 22643 #define RW_LOCK_MAGIC_N 22643
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
/* The structure for storing debug info of an rw-lock */ /** The structure for storing debug info of an rw-lock. All access to this
structure must be protected by rw_lock_debug_mutex_enter(). */
struct rw_lock_debug_struct { struct rw_lock_debug_struct {
os_thread_id_t thread_id; /* The thread id of the thread which os_thread_id_t thread_id; /* The thread id of the thread which
......
...@@ -732,7 +732,7 @@ rw_lock_own( ...@@ -732,7 +732,7 @@ rw_lock_own(
ut_ad(lock); ut_ad(lock);
ut_ad(rw_lock_validate(lock)); ut_ad(rw_lock_validate(lock));
mutex_enter(&(lock->mutex)); rw_lock_debug_mutex_enter();
info = UT_LIST_GET_FIRST(lock->debug_list); info = UT_LIST_GET_FIRST(lock->debug_list);
...@@ -742,7 +742,7 @@ rw_lock_own( ...@@ -742,7 +742,7 @@ rw_lock_own(
&& (info->pass == 0) && (info->pass == 0)
&& (info->lock_type == lock_type)) { && (info->lock_type == lock_type)) {
mutex_exit(&(lock->mutex)); rw_lock_debug_mutex_exit();
/* Found! */ /* Found! */
return(TRUE); return(TRUE);
...@@ -750,7 +750,7 @@ rw_lock_own( ...@@ -750,7 +750,7 @@ rw_lock_own(
info = UT_LIST_GET_NEXT(list, info); info = UT_LIST_GET_NEXT(list, info);
} }
mutex_exit(&(lock->mutex)); rw_lock_debug_mutex_exit();
return(FALSE); return(FALSE);
} }
...@@ -830,11 +830,13 @@ rw_lock_list_print_info( ...@@ -830,11 +830,13 @@ rw_lock_list_print_info(
putc('\n', file); putc('\n', file);
} }
rw_lock_debug_mutex_enter();
info = UT_LIST_GET_FIRST(lock->debug_list); info = UT_LIST_GET_FIRST(lock->debug_list);
while (info != NULL) { while (info != NULL) {
rw_lock_debug_print(file, info); rw_lock_debug_print(file, info);
info = UT_LIST_GET_NEXT(list, info); info = UT_LIST_GET_NEXT(list, info);
} }
rw_lock_debug_mutex_exit();
} }
mutex_exit(&(lock->mutex)); mutex_exit(&(lock->mutex));
...@@ -870,11 +872,13 @@ rw_lock_print( ...@@ -870,11 +872,13 @@ rw_lock_print(
putc('\n', stderr); putc('\n', stderr);
} }
rw_lock_debug_mutex_enter();
info = UT_LIST_GET_FIRST(lock->debug_list); info = UT_LIST_GET_FIRST(lock->debug_list);
while (info != NULL) { while (info != NULL) {
rw_lock_debug_print(stderr, info); rw_lock_debug_print(stderr, info);
info = UT_LIST_GET_NEXT(list, info); info = UT_LIST_GET_NEXT(list, info);
} }
rw_lock_debug_mutex_exit();
} }
} }
......
2011-09-29 The InnoDB Team
* sync/sync0rw.c:
Fix Bug#13034534 RQG TESTS FAIL ON WINDOWS WITH CRASH NEAR RW_LOCK_DEBUG_PRINT
2011-09-20 The InnoDB Team 2011-09-20 The InnoDB Team
* row/row0purge.c: * row/row0purge.c:
......
...@@ -564,7 +564,8 @@ struct rw_lock_struct { ...@@ -564,7 +564,8 @@ struct rw_lock_struct {
}; };
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
/** The structure for storing debug info of an rw-lock */ /** The structure for storing debug info of an rw-lock. All access to this
structure must be protected by rw_lock_debug_mutex_enter(). */
struct rw_lock_debug_struct { struct rw_lock_debug_struct {
os_thread_id_t thread_id; /*!< The thread id of the thread which os_thread_id_t thread_id; /*!< The thread id of the thread which
......
...@@ -928,11 +928,13 @@ rw_lock_list_print_info( ...@@ -928,11 +928,13 @@ rw_lock_list_print_info(
putc('\n', file); putc('\n', file);
} }
rw_lock_debug_mutex_enter();
info = UT_LIST_GET_FIRST(lock->debug_list); info = UT_LIST_GET_FIRST(lock->debug_list);
while (info != NULL) { while (info != NULL) {
rw_lock_debug_print(file, info); rw_lock_debug_print(file, info);
info = UT_LIST_GET_NEXT(list, info); info = UT_LIST_GET_NEXT(list, info);
} }
rw_lock_debug_mutex_exit();
} }
#ifndef INNODB_RW_LOCKS_USE_ATOMICS #ifndef INNODB_RW_LOCKS_USE_ATOMICS
mutex_exit(&(lock->mutex)); mutex_exit(&(lock->mutex));
...@@ -976,11 +978,13 @@ rw_lock_print( ...@@ -976,11 +978,13 @@ rw_lock_print(
putc('\n', stderr); putc('\n', stderr);
} }
rw_lock_debug_mutex_enter();
info = UT_LIST_GET_FIRST(lock->debug_list); info = UT_LIST_GET_FIRST(lock->debug_list);
while (info != NULL) { while (info != NULL) {
rw_lock_debug_print(stderr, info); rw_lock_debug_print(stderr, info);
info = UT_LIST_GET_NEXT(list, info); info = UT_LIST_GET_NEXT(list, info);
} }
rw_lock_debug_mutex_exit();
} }
} }
......
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