diff options
-rw-r--r-- | mysql-test/suite/perfschema/t/myisam_file_io.opt | 2 | ||||
-rw-r--r-- | sql/my_apc.h | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 12 | ||||
-rw-r--r-- | sql/sql_repl.h | 2 | ||||
-rw-r--r-- | storage/maria/ma_static.c | 5 | ||||
-rw-r--r-- | storage/maria/maria_def.h | 5 |
6 files changed, 17 insertions, 11 deletions
diff --git a/mysql-test/suite/perfschema/t/myisam_file_io.opt b/mysql-test/suite/perfschema/t/myisam_file_io.opt index f2e233bd4ab..5bec10ab266 100644 --- a/mysql-test/suite/perfschema/t/myisam_file_io.opt +++ b/mysql-test/suite/perfschema/t/myisam_file_io.opt @@ -1 +1 @@ ---performance_schema_events_waits_history_long_size=5000 +--loose-performance_schema_events_waits_history_long_size=5000 diff --git a/sql/my_apc.h b/sql/my_apc.h index a12db5093a4..4643e641ff1 100644 --- a/sql/my_apc.h +++ b/sql/my_apc.h @@ -134,6 +134,8 @@ private: #ifdef HAVE_PSI_INTERFACE void init_show_explain_psi_keys(void); +#else +#define init_show_explain_psi_keys() /* no-op */ #endif #endif //SQL_MY_APC_INCLUDED diff --git a/sql/mysqld.cc b/sql/mysqld.cc index deef5f24926..d646bc251f7 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -758,8 +758,9 @@ static char **remaining_argv; int orig_argc; char **orig_argv; -static struct my_option pfs_early_options[] __attribute__((unused)) = +static struct my_option pfs_early_options[]= { +#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE {"performance_schema_instrument", OPT_PFS_INSTRUMENT, "Default startup value for a performance schema instrument.", &pfs_param.m_pfs_instrument, &pfs_param.m_pfs_instrument, 0, GET_STR, @@ -824,6 +825,7 @@ static struct my_option pfs_early_options[] __attribute__((unused)) = &pfs_param.m_consumer_statement_digest_enabled, &pfs_param.m_consumer_statement_digest_enabled, 0, GET_BOOL, OPT_ARG, TRUE, 0, 0, 0, 0, 0} +#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */ }; #ifdef HAVE_PSI_INTERFACE @@ -1146,7 +1148,6 @@ void net_after_header_psi(struct st_net *net, void *user_data, size_t /* unused: void init_net_server_extension(THD *thd) { -#ifdef HAVE_PSI_INTERFACE /* Start with a clean state for connection events. */ thd->m_idle_psi= NULL; thd->m_statement_psi= NULL; @@ -1157,9 +1158,6 @@ void init_net_server_extension(THD *thd) thd->m_net_server_extension.m_after_header= net_after_header_psi; /* Activate this private extension for the mysqld server. */ thd->net.extension= & thd->m_net_server_extension; -#else - thd->net.extension= NULL; -#endif } #endif /* EMBEDDED_LIBRARY */ @@ -5137,9 +5135,11 @@ int mysqld_main(int argc, char **argv) buffered_logs.init(); my_getopt_error_reporter= buffered_option_error_reporter; my_charset_error_reporter= buffered_option_error_reporter; +#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE pfs_param.m_pfs_instrument= const_cast<char*>(""); +#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */ - int ho_error= handle_early_options(); + int ho_error __attribute__((unused))= handle_early_options(); #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE if (ho_error == 0) diff --git a/sql/sql_repl.h b/sql/sql_repl.h index da55e3e863f..018b23673ee 100644 --- a/sql/sql_repl.h +++ b/sql/sql_repl.h @@ -67,7 +67,9 @@ int log_loaded_block(IO_CACHE* file); int init_replication_sys_vars(); void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, ushort flags); +#ifdef HAVE_PSI_INTERFACE extern PSI_mutex_key key_LOCK_slave_state, key_LOCK_binlog_state; +#endif void rpl_init_gtid_slave_state(); void rpl_deinit_gtid_slave_state(); int gtid_state_from_binlog_pos(const char *name, uint32 pos, String *out_str); diff --git a/storage/maria/ma_static.c b/storage/maria/ma_static.c index b8c244aed7e..8c6bf85b39e 100644 --- a/storage/maria/ma_static.c +++ b/storage/maria/ma_static.c @@ -146,6 +146,7 @@ PSI_thread_key key_thread_checkpoint, key_thread_find_all_keys, PSI_file_key key_file_translog, key_file_kfile, key_file_dfile, key_file_control, key_file_tmp; -PSI_stage_info stage_waiting_for_a_resource= { 0, "Waiting for a resource", 0}; - #endif /* HAVE_PSI_INTERFACE */ + +/* Note that PSI_stage_info globals must always be declared. */ +PSI_stage_info stage_waiting_for_a_resource= { 0, "Waiting for a resource", 0}; diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h index e672b779f88..7389184253f 100644 --- a/storage/maria/maria_def.h +++ b/storage/maria/maria_def.h @@ -930,10 +930,11 @@ extern PSI_thread_key key_thread_checkpoint, key_thread_find_all_keys, extern PSI_file_key key_file_translog, key_file_kfile, key_file_dfile, key_file_control, key_file_tmp; -extern PSI_stage_info stage_waiting_for_a_resource; - #endif +/* Note that PSI_stage_info globals must always be declared. */ +extern PSI_stage_info stage_waiting_for_a_resource; + /* This is used by _ma_calc_xxx_key_length och _ma_store_key */ typedef struct st_maria_s_param { |