Commit 75d4c530 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-26879: Detach innodb_evict_tables_on_commit_debug from SAFE_MUTEX

In commit 18535a40 (MDEV-24811)
the implementation of innodb_evict_tables_on_commit_debug
depended on dict_sys.mutex and SAFE_MUTEX.
That is no longer the case.

SAFE_MUTEX is not available on Microsoft Windows.
parent e8d1bb04
......@@ -200,7 +200,7 @@ static char* innodb_version_str = (char*) INNODB_VERSION_STR;
extern uint srv_fil_crypt_rotate_key_age;
extern uint srv_n_fil_crypt_iops;
#if defined SAFE_MUTEX && defined UNIV_DEBUG
#ifdef UNIV_DEBUG
my_bool innodb_evict_tables_on_commit_debug;
#endif
......@@ -19615,12 +19615,10 @@ static MYSQL_SYSVAR_BOOL(trx_purge_view_update_only_debug,
" but the each purges were not done yet.",
NULL, NULL, FALSE);
# ifdef SAFE_MUTEX
static MYSQL_SYSVAR_BOOL(evict_tables_on_commit_debug,
innodb_evict_tables_on_commit_debug, PLUGIN_VAR_OPCMDARG,
"On transaction commit, try to evict tables from the data dictionary cache.",
NULL, NULL, FALSE);
# endif /* SAFE_MUTEX */
static MYSQL_SYSVAR_UINT(data_file_size_debug,
srv_sys_space_size_debug,
......@@ -19895,9 +19893,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(trx_rseg_n_slots_debug),
MYSQL_SYSVAR(limit_optimistic_insert_debug),
MYSQL_SYSVAR(trx_purge_view_update_only_debug),
# ifdef SAFE_MUTEX
MYSQL_SYSVAR(evict_tables_on_commit_debug),
# endif /* SAFE_MUTEX */
MYSQL_SYSVAR(data_file_size_debug),
MYSQL_SYSVAR(fil_make_page_dirty_debug),
MYSQL_SYSVAR(saved_page_number_debug),
......
......@@ -3873,7 +3873,7 @@ TRANSACTIONAL_TARGET static bool lock_release_try(trx_t *trx)
and release possible other transactions waiting because of these locks. */
void lock_release(trx_t *trx)
{
#if defined SAFE_MUTEX && defined UNIV_DEBUG
#ifdef UNIV_DEBUG
std::set<table_id_t> to_evict;
if (innodb_evict_tables_on_commit_debug &&
!trx->is_recovered && !trx->dict_operation &&
......@@ -3937,7 +3937,7 @@ void lock_release(trx_t *trx)
trx->lock.was_chosen_as_deadlock_victim= false;
trx->lock.n_rec_locks= 0;
#if defined SAFE_MUTEX && defined UNIV_DEBUG
#ifdef UNIV_DEBUG
if (to_evict.empty())
return;
dict_sys.lock(SRW_LOCK_CALL);
......
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