summaryrefslogtreecommitdiff
path: root/sql
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 /sql
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.
Diffstat (limited to 'sql')
-rw-r--r--sql/table_cache.h2
-rw-r--r--sql/wsrep_mysqld.cc9
2 files changed, 5 insertions, 6 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));
}