Commit 48de6a60 authored by Dmitry Lenev's avatar Dmitry Lenev

Fix compile warning about passing NULL to non-pointer

argument of inline_mysql_mutex_init in sql_base.cc.

When initializing LOCK_dd_owns_lock_open mutex pass
correct PSI key instead of NULL value.

mysql-test/suite/perfschema/r/dml_setup_instruments.result:
  Updated test results after adding P_S instrumentation
  for LOCK_dd_owns_lock_open.
sql/sql_base.cc:
  When initializing LOCK_dd_owns_lock_open mutex pass
  correct PSI key instead of NULL value.
parent 7a30a122
......@@ -13,7 +13,7 @@ wait/synch/mutex/sql/LOCK_active_mi YES YES
wait/synch/mutex/sql/LOCK_audit_mask YES YES
wait/synch/mutex/sql/LOCK_connection_count YES YES
wait/synch/mutex/sql/LOCK_crypt YES YES
wait/synch/mutex/sql/LOCK_delayed_create YES YES
wait/synch/mutex/sql/LOCK_dd_owns_lock_open YES YES
select * from performance_schema.SETUP_INSTRUMENTS
where name like 'Wait/Synch/Rwlock/sql/%'
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
......
......@@ -104,9 +104,10 @@ mysql_mutex_t LOCK_dd_owns_lock_open;
uint dd_owns_lock_open= 0;
#ifdef HAVE_PSI_INTERFACE
static PSI_mutex_key key_LOCK_open;
static PSI_mutex_key key_LOCK_open, key_LOCK_dd_owns_lock_open;
static PSI_mutex_info all_tdc_mutexes[]= {
{ &key_LOCK_open, "LOCK_open", PSI_FLAG_GLOBAL }
{ &key_LOCK_open, "LOCK_open", PSI_FLAG_GLOBAL },
{ &key_LOCK_dd_owns_lock_open, "LOCK_dd_owns_lock_open", PSI_FLAG_GLOBAL }
};
/**
......@@ -300,7 +301,8 @@ bool table_def_init(void)
init_tdc_psi_keys();
#endif
mysql_mutex_init(key_LOCK_open, &LOCK_open, MY_MUTEX_INIT_FAST);
mysql_mutex_init(NULL, &LOCK_dd_owns_lock_open, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_dd_owns_lock_open, &LOCK_dd_owns_lock_open,
MY_MUTEX_INIT_FAST);
oldest_unused_share= &end_of_unused_share;
end_of_unused_share.prev= &oldest_unused_share;
......
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