Skip to content

Commit 46f1b75

Browse files
Tor Didriksendahlerlend
authored andcommitted
Bug #33705056: Assertion failure on double LOCK_plugin inside page_track_service in debug mode
Post-push fix: error: unused variable 'LOCK_plugin' [-Werror=unused-variable] Change-Id: I89b1516acb953eb3ed28544569b00153334a8882 (cherry picked from commit e3c526539ee59450b163830e44c57da8656d612e)
1 parent 9dc7705 commit 46f1b75

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

storage/perfschema/pfs_variable.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ bool PFS_system_variable_cache::init_show_var_array(enum_var_type scope,
9191
assert(!m_initialized);
9292
m_query_scope = scope;
9393

94+
#ifndef NDEBUG
9495
extern mysql_mutex_t LOCK_plugin;
9596
mysql_mutex_assert_not_owner(&LOCK_plugin);
97+
#endif
9698
mysql_rwlock_rdlock(&LOCK_system_variables_hash);
9799
DEBUG_SYNC(m_current_thd, "acquired_LOCK_system_variables_hash");
98100

storage/perfschema/table_session_variables.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ PFS_engine_table *table_session_variables::create(PFS_engine_table_share *) {
9090

9191
ha_rows table_session_variables::get_row_count(void) {
9292
mysql_mutex_lock(&LOCK_plugin_delete);
93+
#ifndef NDEBUG
9394
extern mysql_mutex_t LOCK_plugin;
9495
mysql_mutex_assert_not_owner(&LOCK_plugin);
96+
#endif
9597
mysql_rwlock_rdlock(&LOCK_system_variables_hash);
9698
ha_rows system_var_count = get_system_variable_count();
9799
mysql_rwlock_unlock(&LOCK_system_variables_hash);

storage/perfschema/table_variables_by_thread.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ PFS_engine_table *table_variables_by_thread::create(PFS_engine_table_share *) {
101101

102102
ha_rows table_variables_by_thread::get_row_count(void) {
103103
mysql_mutex_lock(&LOCK_plugin_delete);
104+
#ifndef NDEBUG
104105
extern mysql_mutex_t LOCK_plugin;
105106
mysql_mutex_assert_not_owner(&LOCK_plugin);
107+
#endif
106108
mysql_rwlock_rdlock(&LOCK_system_variables_hash);
107109
ulong system_var_count = get_system_variable_count();
108110
mysql_rwlock_unlock(&LOCK_system_variables_hash);

storage/perfschema/table_variables_info.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ PFS_engine_table *table_variables_info::create(PFS_engine_table_share *) {
8787

8888
ha_rows table_variables_info::get_row_count(void) {
8989
mysql_mutex_lock(&LOCK_plugin_delete);
90+
#ifndef NDEBUG
9091
extern mysql_mutex_t LOCK_plugin;
9192
mysql_mutex_assert_not_owner(&LOCK_plugin);
93+
#endif
9294
mysql_rwlock_rdlock(&LOCK_system_variables_hash);
9395
ha_rows system_var_count = get_system_variable_count();
9496
mysql_rwlock_unlock(&LOCK_system_variables_hash);

0 commit comments

Comments
 (0)