Commit 2b253ed4 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-8324 - MariaDB fails to build with performance schema disabled

Various fixes to let MariaDB compile with performance schema disabled.
parent 366cda49
......@@ -16,8 +16,10 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifdef HAVE_PSI_INTERFACE
extern PSI_mutex_key key_TABLE_SHARE_LOCK_table_share;
extern PSI_cond_key key_TABLE_SHARE_COND_release;
#endif
class TDC_element
{
......
......@@ -164,10 +164,6 @@ static PSI_file_info wsrep_files[]=
{
{ &key_file_wsrep_gra_log, "wsrep_gra_log", 0}
};
#else
#define mysql_mutex_register(X,Y,Z)
#define mysql_cond_register(X,Y,Z)
#endif
my_bool wsrep_inited = 0; // initialized ?
......@@ -811,8 +807,11 @@ int wsrep_init()
/* Initialize wsrep thread LOCKs and CONDs */
void wsrep_thr_init()
{
#ifdef HAVE_PSI_INTERFACE
mysql_mutex_register("sql", wsrep_mutexes, array_elements(wsrep_mutexes));
mysql_cond_register("sql", wsrep_conds, array_elements(wsrep_conds));
mysql_file_register("sql", wsrep_files, array_elements(wsrep_files));
#endif
mysql_mutex_init(key_LOCK_wsrep_ready, &LOCK_wsrep_ready, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_COND_wsrep_ready, &COND_wsrep_ready, NULL);
......@@ -827,8 +826,6 @@ void wsrep_thr_init()
mysql_mutex_init(key_LOCK_wsrep_slave_threads, &LOCK_wsrep_slave_threads, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_wsrep_desync, &LOCK_wsrep_desync, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_wsrep_config_state, &LOCK_wsrep_config_state, MY_MUTEX_INIT_FAST);
mysql_file_register("sql", wsrep_files, array_elements(wsrep_files));
}
......
......@@ -162,7 +162,7 @@ defined, the rwlock are instrumented with performance schema probes. */
# endif/* UNIV_SYNC_DEBUG */
# else /* UNIV_DEBUG */
# define rw_lock_create(K, L, level) \
rw_lock_create_func((L), __FILE__, __LINE__)
rw_lock_create_func((L), #L, __FILE__, __LINE__)
# endif /* UNIV_DEBUG */
/**************************************************************//**
......
......@@ -210,7 +210,7 @@ original non-instrumented functions */
# endif /* UNIV_SYNC_DEBUG */
# else /* UNIV_DEBUG */
# define mutex_create(K, M, level) \
mutex_create_func((M), __FILE__, __LINE__)
mutex_create_func((M), #M, __FILE__, __LINE__)
# endif /* UNIV_DEBUG */
# define mutex_enter(M) mutex_enter_func((M), __FILE__, __LINE__)
......
......@@ -163,7 +163,7 @@ defined, the rwlock are instrumented with performance schema probes. */
# endif/* UNIV_SYNC_DEBUG */
# else /* UNIV_DEBUG */
# define rw_lock_create(K, L, level) \
rw_lock_create_func((L), __FILE__, __LINE__)
rw_lock_create_func((L), #L, __FILE__, __LINE__)
# endif /* UNIV_DEBUG */
/**************************************************************//**
......
......@@ -224,7 +224,7 @@ original non-instrumented functions */
# endif /* UNIV_SYNC_DEBUG */
# else /* UNIV_DEBUG */
# define mutex_create(K, M, level) \
mutex_create_func((M), #M)
mutex_create_func((M), __FILE__, __LINE__, #M)
# endif /* UNIV_DEBUG */
# define mutex_enter(M) mutex_enter_func((M), __FILE__, __LINE__)
......
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