summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-06-17 12:37:19 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-06-19 15:06:33 +0400
commit2b253ed41fb606de3c6d8573f95f69ae2faf18d3 (patch)
tree6ccb70b256f9beb068758cfaff6f1585f01d3dab
parent366cda49370eedb50dbb53ee53d3cd907c59e76d (diff)
downloadmariadb-git-2b253ed41fb606de3c6d8573f95f69ae2faf18d3.tar.gz
MDEV-8324 - MariaDB fails to build with performance schema disabled
Various fixes to let MariaDB compile with performance schema disabled.
-rw-r--r--sql/table_cache.h2
-rw-r--r--sql/wsrep_mysqld.cc9
-rw-r--r--storage/innobase/include/sync0rw.h2
-rw-r--r--storage/innobase/include/sync0sync.h2
-rw-r--r--storage/xtradb/include/sync0rw.h2
-rw-r--r--storage/xtradb/include/sync0sync.h2
6 files changed, 9 insertions, 10 deletions
diff --git a/sql/table_cache.h b/sql/table_cache.h
index 2d70e4c90a5..262028da9f3 100644
--- a/sql/table_cache.h
+++ b/sql/table_cache.h
@@ -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
{
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 33d1d2a0966..10a138a1519 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -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));
}
diff --git a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0rw.h
index cfd9776959f..d212ac17871 100644
--- a/storage/innobase/include/sync0rw.h
+++ b/storage/innobase/include/sync0rw.h
@@ -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 */
/**************************************************************//**
diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h
index 2ffa14fd7fb..d9c9d7cfbac 100644
--- a/storage/innobase/include/sync0sync.h
+++ b/storage/innobase/include/sync0sync.h
@@ -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__)
diff --git a/storage/xtradb/include/sync0rw.h b/storage/xtradb/include/sync0rw.h
index 1df6a793637..d59613e0abb 100644
--- a/storage/xtradb/include/sync0rw.h
+++ b/storage/xtradb/include/sync0rw.h
@@ -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 */
/**************************************************************//**
diff --git a/storage/xtradb/include/sync0sync.h b/storage/xtradb/include/sync0sync.h
index 0d36a8e7bd8..ce338acd7e1 100644
--- a/storage/xtradb/include/sync0sync.h
+++ b/storage/xtradb/include/sync0sync.h
@@ -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__)