mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user