Commit 4320a81f authored by Jimmy Yang's avatar Jimmy Yang

Fix Bug #13860722 - INCOMPLETE PERFORMANCE SCHEMA INSTRUMENTATION IN INNODB

parent f75dbdd1
...@@ -2461,7 +2461,7 @@ wait_until_unfixed: ...@@ -2461,7 +2461,7 @@ wait_until_unfixed:
block->page.buf_fix_count = 1; block->page.buf_fix_count = 1;
buf_block_set_io_fix(block, BUF_IO_READ); buf_block_set_io_fix(block, BUF_IO_READ);
rw_lock_x_lock_func(&block->lock, 0, file, line); rw_lock_x_lock_inline(&block->lock, 0, file, line);
UNIV_MEM_INVALID(bpage, sizeof *bpage); UNIV_MEM_INVALID(bpage, sizeof *bpage);
...@@ -2601,14 +2601,14 @@ wait_until_unfixed: ...@@ -2601,14 +2601,14 @@ wait_until_unfixed:
break; break;
case RW_S_LATCH: case RW_S_LATCH:
rw_lock_s_lock_func(&(block->lock), 0, file, line); rw_lock_s_lock_inline(&(block->lock), 0, file, line);
fix_type = MTR_MEMO_PAGE_S_FIX; fix_type = MTR_MEMO_PAGE_S_FIX;
break; break;
default: default:
ut_ad(rw_latch == RW_X_LATCH); ut_ad(rw_latch == RW_X_LATCH);
rw_lock_x_lock_func(&(block->lock), 0, file, line); rw_lock_x_lock_inline(&(block->lock), 0, file, line);
fix_type = MTR_MEMO_PAGE_X_FIX; fix_type = MTR_MEMO_PAGE_X_FIX;
break; break;
...@@ -2688,7 +2688,7 @@ buf_page_optimistic_get( ...@@ -2688,7 +2688,7 @@ buf_page_optimistic_get(
file, line); file, line);
fix_type = MTR_MEMO_PAGE_S_FIX; fix_type = MTR_MEMO_PAGE_S_FIX;
} else { } else {
success = rw_lock_x_lock_func_nowait(&(block->lock), success = rw_lock_x_lock_func_nowait_inline(&(block->lock),
file, line); file, line);
fix_type = MTR_MEMO_PAGE_X_FIX; fix_type = MTR_MEMO_PAGE_X_FIX;
} }
...@@ -2818,7 +2818,7 @@ buf_page_get_known_nowait( ...@@ -2818,7 +2818,7 @@ buf_page_get_known_nowait(
file, line); file, line);
fix_type = MTR_MEMO_PAGE_S_FIX; fix_type = MTR_MEMO_PAGE_S_FIX;
} else { } else {
success = rw_lock_x_lock_func_nowait(&(block->lock), success = rw_lock_x_lock_func_nowait_inline(&(block->lock),
file, line); file, line);
fix_type = MTR_MEMO_PAGE_X_FIX; fix_type = MTR_MEMO_PAGE_X_FIX;
} }
...@@ -2906,7 +2906,7 @@ buf_page_try_get_func( ...@@ -2906,7 +2906,7 @@ buf_page_try_get_func(
S-latch. */ S-latch. */
fix_type = MTR_MEMO_PAGE_X_FIX; fix_type = MTR_MEMO_PAGE_X_FIX;
success = rw_lock_x_lock_func_nowait(&block->lock, success = rw_lock_x_lock_func_nowait_inline(&block->lock,
file, line); file, line);
} }
......
...@@ -249,7 +249,7 @@ mtr_s_lock_func( ...@@ -249,7 +249,7 @@ mtr_s_lock_func(
ut_ad(mtr); ut_ad(mtr);
ut_ad(lock); ut_ad(lock);
rw_lock_s_lock_func(lock, 0, file, line); rw_lock_s_lock_inline(lock, 0, file, line);
mtr_memo_push(mtr, lock, MTR_MEMO_S_LOCK); mtr_memo_push(mtr, lock, MTR_MEMO_S_LOCK);
} }
...@@ -268,7 +268,7 @@ mtr_x_lock_func( ...@@ -268,7 +268,7 @@ mtr_x_lock_func(
ut_ad(mtr); ut_ad(mtr);
ut_ad(lock); ut_ad(lock);
rw_lock_x_lock_func(lock, 0, file, line); rw_lock_x_lock_inline(lock, 0, file, line);
mtr_memo_push(mtr, lock, MTR_MEMO_X_LOCK); mtr_memo_push(mtr, lock, MTR_MEMO_X_LOCK);
} }
......
...@@ -154,6 +154,9 @@ unlocking, not the corresponding function. */ ...@@ -154,6 +154,9 @@ unlocking, not the corresponding function. */
# define rw_lock_s_lock(M) \ # define rw_lock_s_lock(M) \
rw_lock_s_lock_func((M), 0, __FILE__, __LINE__) rw_lock_s_lock_func((M), 0, __FILE__, __LINE__)
# define rw_lock_s_lock_inline(M, P, F, L) \
rw_lock_s_lock_func((M), (P), (F), (L))
# define rw_lock_s_lock_gen(M, P) \ # define rw_lock_s_lock_gen(M, P) \
rw_lock_s_lock_func((M), (P), __FILE__, __LINE__) rw_lock_s_lock_func((M), (P), __FILE__, __LINE__)
...@@ -170,12 +173,18 @@ unlocking, not the corresponding function. */ ...@@ -170,12 +173,18 @@ unlocking, not the corresponding function. */
# define rw_lock_x_lock(M) \ # define rw_lock_x_lock(M) \
rw_lock_x_lock_func((M), 0, __FILE__, __LINE__) rw_lock_x_lock_func((M), 0, __FILE__, __LINE__)
# define rw_lock_x_lock_inline(M, P, F, L) \
rw_lock_x_lock_func((M), (P), (F), (L))
# define rw_lock_x_lock_gen(M, P) \ # define rw_lock_x_lock_gen(M, P) \
rw_lock_x_lock_func((M), (P), __FILE__, __LINE__) rw_lock_x_lock_func((M), (P), __FILE__, __LINE__)
# define rw_lock_x_lock_nowait(M) \ # define rw_lock_x_lock_nowait(M) \
rw_lock_x_lock_func_nowait((M), __FILE__, __LINE__) rw_lock_x_lock_func_nowait((M), __FILE__, __LINE__)
# define rw_lock_x_lock_func_nowait_inline(M, F, L) \
rw_lock_x_lock_func_nowait((M), (F), (L))
# ifdef UNIV_SYNC_DEBUG # ifdef UNIV_SYNC_DEBUG
# define rw_lock_x_unlock_gen(L, P) rw_lock_x_unlock_func(P, L) # define rw_lock_x_unlock_gen(L, P) rw_lock_x_unlock_func(P, L)
# else # else
...@@ -207,6 +216,9 @@ unlocking, not the corresponding function. */ ...@@ -207,6 +216,9 @@ unlocking, not the corresponding function. */
# define rw_lock_s_lock(M) \ # define rw_lock_s_lock(M) \
pfs_rw_lock_s_lock_func((M), 0, __FILE__, __LINE__) pfs_rw_lock_s_lock_func((M), 0, __FILE__, __LINE__)
# define rw_lock_s_lock_inline(M, P, F, L) \
pfs_rw_lock_s_lock_func((M), (P), (F), (L))
# define rw_lock_s_lock_gen(M, P) \ # define rw_lock_s_lock_gen(M, P) \
pfs_rw_lock_s_lock_func((M), (P), __FILE__, __LINE__) pfs_rw_lock_s_lock_func((M), (P), __FILE__, __LINE__)
...@@ -222,12 +234,18 @@ unlocking, not the corresponding function. */ ...@@ -222,12 +234,18 @@ unlocking, not the corresponding function. */
# define rw_lock_x_lock(M) \ # define rw_lock_x_lock(M) \
pfs_rw_lock_x_lock_func((M), 0, __FILE__, __LINE__) pfs_rw_lock_x_lock_func((M), 0, __FILE__, __LINE__)
# define rw_lock_x_lock_inline(M, P, F, L) \
pfs_rw_lock_x_lock_func((M), (P), (F), (L))
# define rw_lock_x_lock_gen(M, P) \ # define rw_lock_x_lock_gen(M, P) \
pfs_rw_lock_x_lock_func((M), (P), __FILE__, __LINE__) pfs_rw_lock_x_lock_func((M), (P), __FILE__, __LINE__)
# define rw_lock_x_lock_nowait(M) \ # define rw_lock_x_lock_nowait(M) \
pfs_rw_lock_x_lock_func_nowait((M), __FILE__, __LINE__) pfs_rw_lock_x_lock_func_nowait((M), __FILE__, __LINE__)
# define rw_lock_x_lock_func_nowait_inline(M, F, L) \
pfs_rw_lock_x_lock_func_nowait((M), (F), (L))
# ifdef UNIV_SYNC_DEBUG # ifdef UNIV_SYNC_DEBUG
# define rw_lock_x_unlock_gen(L, P) pfs_rw_lock_x_unlock_func(P, L) # define rw_lock_x_unlock_gen(L, P) pfs_rw_lock_x_unlock_func(P, L)
# else # else
......
...@@ -1783,7 +1783,7 @@ row_mysql_freeze_data_dictionary_func( ...@@ -1783,7 +1783,7 @@ row_mysql_freeze_data_dictionary_func(
{ {
ut_a(trx->dict_operation_lock_mode == 0); ut_a(trx->dict_operation_lock_mode == 0);
rw_lock_s_lock_func(&dict_operation_lock, 0, file, line); rw_lock_s_lock_inline(&dict_operation_lock, 0, file, line);
trx->dict_operation_lock_mode = RW_S_LATCH; trx->dict_operation_lock_mode = RW_S_LATCH;
} }
...@@ -1820,7 +1820,7 @@ row_mysql_lock_data_dictionary_func( ...@@ -1820,7 +1820,7 @@ row_mysql_lock_data_dictionary_func(
/* Serialize data dictionary operations with dictionary mutex: /* Serialize data dictionary operations with dictionary mutex:
no deadlocks or lock waits can occur then in these operations */ no deadlocks or lock waits can occur then in these operations */
rw_lock_x_lock_func(&dict_operation_lock, 0, file, line); rw_lock_x_lock_inline(&dict_operation_lock, 0, file, line);
trx->dict_operation_lock_mode = RW_X_LATCH; trx->dict_operation_lock_mode = RW_X_LATCH;
mutex_enter(&(dict_sys->mutex)); mutex_enter(&(dict_sys->mutex));
......
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