diff options
author | Jon Olav Hauglid <jon.hauglid@sun.com> | 2009-10-09 15:59:25 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@sun.com> | 2009-10-09 15:59:25 +0200 |
commit | 0da357645c41867552481b18b7de12806f743fe0 (patch) | |
tree | 8628f4fb30cdce946155ba0ac7dae5cabe323eac /sql | |
parent | 220d9b8c4abed2feaa1523e2146e6d472f1c1627 (diff) | |
download | mariadb-git-0da357645c41867552481b18b7de12806f743fe0.tar.gz |
Bug #44651 "have_community_features" variable should be renamed
"have_profiling"
1) Renamed have_community_features server system variable to
have_profiling.
2) Removed eable-community-features configure option and
ENABLE_COMMUNITY_FEATURES macro.
3) Removed COMMUNITY_SERVER macro and replaced its usage by
ENABLED_PROFILING.
Only --enable-profiling is now needed to enable profiling.
It was the only existing "community feature", so there was
no need for both configure options.
Using --enable-community-features will give a warning message
since it no longer exists.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysql_priv.h | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 16 | ||||
-rw-r--r-- | sql/set_var.cc | 4 | ||||
-rw-r--r-- | sql/sp_head.cc | 10 | ||||
-rw-r--r-- | sql/sql_class.cc | 4 | ||||
-rw-r--r-- | sql/sql_class.h | 2 | ||||
-rw-r--r-- | sql/sql_parse.cc | 20 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 2 | ||||
-rw-r--r-- | sql/sql_profile.cc | 4 | ||||
-rw-r--r-- | sql/sql_profile.h | 2 |
10 files changed, 32 insertions, 34 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index f5e43c5100a..64616e08228 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -2082,7 +2082,7 @@ extern uint sql_command_flags[]; extern TYPELIB log_output_typelib; /* optional things, have_* variables */ -extern SHOW_COMP_OPTION have_community_features; +extern SHOW_COMP_OPTION have_profiling; extern handlerton *partition_hton; extern handlerton *myisam_hton; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 0e76b5f5658..78faaccf881 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -635,7 +635,7 @@ MY_LOCALE *my_default_lc_time_names; SHOW_COMP_OPTION have_ssl, have_symlink, have_dlopen, have_query_cache; SHOW_COMP_OPTION have_geometry, have_rtree_keys; SHOW_COMP_OPTION have_crypt, have_compress; -SHOW_COMP_OPTION have_community_features; +SHOW_COMP_OPTION have_profiling; /* Thread specific variables */ @@ -6230,7 +6230,7 @@ master-ssl", "Maximum time in seconds to wait for the port to become free. " "(Default: no wait)", (uchar**) &mysqld_port_timeout, (uchar**) &mysqld_port_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) {"profiling_history_size", OPT_PROFILING, "Limit of query profiling memory", (uchar**) &global_system_variables.profiling_history_size, (uchar**) &max_system_variables.profiling_history_size, @@ -7028,7 +7028,7 @@ static int show_starttime(THD *thd, SHOW_VAR *var, char *buff) return 0; } -#ifdef COMMUNITY_SERVER +#ifdef ENABLED_PROFILING static int show_flushstatustime(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_LONG; @@ -7486,7 +7486,7 @@ SHOW_VAR status_vars[]= { {"Threads_created", (char*) &thread_created, SHOW_LONG_NOFLUSH}, {"Threads_running", (char*) &thread_running, SHOW_INT}, {"Uptime", (char*) &show_starttime, SHOW_FUNC}, -#ifdef COMMUNITY_SERVER +#ifdef ENABLED_PROFILING {"Uptime_since_flush_status",(char*) &show_flushstatustime, SHOW_FUNC}, #endif {NullS, NullS, SHOW_LONG} @@ -7719,10 +7719,10 @@ static int mysql_init_variables(void) "d:t:i:o,/tmp/mysqld.trace"); #endif opt_error_log= IF_WIN(1,0); -#ifdef COMMUNITY_SERVER - have_community_features = SHOW_OPTION_YES; +#ifdef ENABLED_PROFILING + have_profiling = SHOW_OPTION_YES; #else - have_community_features = SHOW_OPTION_NO; + have_profiling = SHOW_OPTION_NO; #endif global_system_variables.ndb_index_stat_enable=FALSE; max_system_variables.ndb_index_stat_enable=TRUE; @@ -8826,9 +8826,7 @@ void refresh_status(THD *thd) /* Reset the counters of all key caches (default and named). */ process_key_caches(reset_key_cache_counters); -#ifdef COMMUNITY_SERVER flush_status_time= time((time_t*) 0); -#endif pthread_mutex_unlock(&LOCK_status); /* diff --git a/sql/set_var.cc b/sql/set_var.cc index ef0801264fb..bbf3611a564 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -762,7 +762,7 @@ static sys_var_thd_bit sys_unique_checks(&vars, "unique_checks", 0, OPTION_RELAXED_UNIQUE_CHECKS, 1, sys_var::SESSION_VARIABLE_IN_BINLOG); -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) static sys_var_thd_bit sys_profiling(&vars, "profiling", NULL, set_option_bit, ulonglong(OPTION_PROFILING)); @@ -864,9 +864,9 @@ static sys_var_have_plugin sys_have_ndbcluster(&vars, "have_ndbcluster", C_STRIN static sys_var_have_variable sys_have_openssl(&vars, "have_openssl", &have_ssl); static sys_var_have_variable sys_have_ssl(&vars, "have_ssl", &have_ssl); static sys_var_have_plugin sys_have_partition_db(&vars, "have_partitioning", C_STRING_WITH_LEN("partition"), MYSQL_STORAGE_ENGINE_PLUGIN); +static sys_var_have_variable sys_have_profiling(&vars, "have_profiling", &have_profiling); static sys_var_have_variable sys_have_query_cache(&vars, "have_query_cache", &have_query_cache); -static sys_var_have_variable sys_have_community_features(&vars, "have_community_features", &have_community_features); static sys_var_have_variable sys_have_rtree_keys(&vars, "have_rtree_keys", &have_rtree_keys); static sys_var_have_variable sys_have_symlink(&vars, "have_symlink", &have_symlink); /* Global read-only variable describing server license */ diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 908f0997be6..7c91281956e 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -1207,7 +1207,7 @@ sp_head::execute(THD *thd) */ thd->spcont->callers_arena= &backup_arena; -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) /* Discard the initial part of executing routines. */ thd->profiling.discard_current_query(); #endif @@ -1216,7 +1216,7 @@ sp_head::execute(THD *thd) sp_instr *i; uint hip; // Handler ip -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) /* Treat each "instr" of a routine as discrete unit that could be profiled. Profiling only records information for segments of code that set the @@ -1229,7 +1229,7 @@ sp_head::execute(THD *thd) i = get_instr(ip); // Returns NULL when we're done. if (i == NULL) { -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.discard_current_query(); #endif break; @@ -1312,7 +1312,7 @@ sp_head::execute(THD *thd) } } while (!err_status && !thd->killed && !thd->is_fatal_error); -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.finish_current_query(); thd->profiling.start_new_query("tail end of routine"); #endif @@ -2844,7 +2844,7 @@ sp_instr_stmt::execute(THD *thd, uint *nextp) query= thd->query; query_length= thd->query_length; -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) /* This s-p instr is profilable and will be captured. */ thd->profiling.set_query_source(m_query.str, m_query.length); #endif diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 01a1fff3048..e386726f51f 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -257,7 +257,7 @@ const char *set_thd_proc_info(THD *thd, const char *info, const char *old_info= thd->proc_info; DBUG_PRINT("proc_info", ("%s:%d %s", calling_file, calling_line, (info != NULL) ? info : "(null)")); -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.status_change(info, calling_function, calling_file, calling_line); #endif thd->proc_info= info; @@ -522,7 +522,7 @@ THD::THD() *scramble= '\0'; init(); -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) profiling.set_thd(this); #endif user_connect=(USER_CONN *)0; diff --git a/sql/sql_class.h b/sql/sql_class.h index 4874801e380..310623c0d5c 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1644,7 +1644,7 @@ public: CHARSET_INFO *db_charset; Warning_info *warning_info; Diagnostics_area *stmt_da; -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) PROFILING profiling; #endif diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 5a4af9afbb1..20a0e65e27b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -375,7 +375,7 @@ void execute_init_command(THD *thd, sys_var_str *init_command_var, Vio* save_vio; ulong save_client_capabilities; -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.start_new_query(); thd->profiling.set_query_source(init_command_var->value, init_command_var->value_length); @@ -403,7 +403,7 @@ void execute_init_command(THD *thd, sys_var_str *init_command_var, thd->client_capabilities= save_client_capabilities; thd->net.vio= save_vio; -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.finish_current_query(); #endif } @@ -479,7 +479,7 @@ static void handle_bootstrap_impl(THD *thd) QUERY_CACHE_FLAGS_SIZE); thd->set_query(query, length); DBUG_PRINT("query",("%-.4096s",thd->query)); -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.start_new_query(); thd->profiling.set_query_source(thd->query, length); #endif @@ -496,7 +496,7 @@ static void handle_bootstrap_impl(THD *thd) bootstrap_error= thd->is_error(); net_end_statement(thd); -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.finish_current_query(); #endif @@ -806,7 +806,7 @@ bool do_command(THD *thd) net_new_transaction(net); packet_length= my_net_read(net); -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.start_new_query(); #endif if (packet_length == packet_error) @@ -866,7 +866,7 @@ bool do_command(THD *thd) return_value= dispatch_command(command, thd, packet+1, (uint) (packet_length-1)); out: -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.finish_current_query(); #endif DBUG_RETURN(return_value); @@ -1223,7 +1223,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, general_log_write(thd, command, thd->query, thd->query_length); DBUG_PRINT("query",("%-.4096s",thd->query)); -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.set_query_source(thd->query, thd->query_length); #endif @@ -1258,7 +1258,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, MYSQL_QUERY_DONE(thd->is_error()); } -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.finish_current_query(); thd->profiling.start_new_query("continuing"); thd->profiling.set_query_source(beginning_of_next_stmt, length); @@ -1778,7 +1778,7 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident, Mark this current profiling record to be discarded. We don't wish to have SHOW commands show up in profiling. */ -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.discard_current_query(); #endif break; @@ -2333,7 +2333,7 @@ mysql_execute_command(THD *thd) } case SQLCOM_SHOW_PROFILES: { -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.discard_current_query(); res= thd->profiling.show_profiles(); if (res) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 75a0c538e04..7694e4cdad5 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2459,7 +2459,7 @@ void mysqld_stmt_execute(THD *thd, char *packet_arg, uint packet_length) DBUG_VOID_RETURN; } -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) thd->profiling.set_query_source(stmt->query, stmt->query_length); #endif DBUG_PRINT("exec_query", ("%s", stmt->query)); diff --git a/sql/sql_profile.cc b/sql/sql_profile.cc index 8c9b147089f..3801d9a3f8d 100644 --- a/sql/sql_profile.cc +++ b/sql/sql_profile.cc @@ -47,7 +47,7 @@ const char * const _unknown_func_ = "<unknown>"; int fill_query_profile_statistics_info(THD *thd, TABLE_LIST *tables, Item *cond) { -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) return(thd->profiling.fill_statistics_info(thd, tables, cond)); #else my_error(ER_FEATURE_DISABLED, MYF(0), "SHOW PROFILE", "enable-profiling"); @@ -129,7 +129,7 @@ int make_profile_table_for_show(THD *thd, ST_SCHEMA_TABLE *schema_table) } -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) #define RUSAGE_USEC(tv) ((tv).tv_sec*1000*1000 + (tv).tv_usec) #define RUSAGE_DIFF_USEC(tv1, tv2) (RUSAGE_USEC((tv1))-RUSAGE_USEC((tv2))) diff --git a/sql/sql_profile.h b/sql/sql_profile.h index 245959e0953..bffe1cb576b 100644 --- a/sql/sql_profile.h +++ b/sql/sql_profile.h @@ -41,7 +41,7 @@ int make_profile_table_for_show(THD *thd, ST_SCHEMA_TABLE *schema_table); #define PROFILE_ALL (uint)(~0) -#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) +#if defined(ENABLED_PROFILING) #include "mysql_priv.h" #ifdef HAVE_SYS_RESOURCE_H |