diff options
author | Dmitry Lenev <Dmitry.Lenev@oracle.com> | 2010-09-24 20:26:24 +0400 |
---|---|---|
committer | Dmitry Lenev <Dmitry.Lenev@oracle.com> | 2010-09-24 20:26:24 +0400 |
commit | afa568c24b3899d096f15041246467920654cbbd (patch) | |
tree | 47f3b2277ccbea1dd9598e84c9c3381fee2d3e60 | |
parent | 5b06699029db4f5fb857d4a07b124a6c87cdca08 (diff) | |
download | mariadb-git-afa568c24b3899d096f15041246467920654cbbd.tar.gz |
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.
-rw-r--r-- | mysql-test/suite/perfschema/r/dml_setup_instruments.result | 2 | ||||
-rw-r--r-- | sql/sql_base.cc | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result index 2338252976c..7f203118346 100644 --- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result +++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result @@ -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') diff --git a/sql/sql_base.cc b/sql/sql_base.cc index b168f561954..c0ea60cac3b 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -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; |