diff options
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a872585e704..fcb7047e998 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1355,7 +1355,7 @@ pthread_handler_t handle_bootstrap(void *arg) thd->db_length+1+QUERY_CACHE_FLAGS_SIZE); thd->query[length] = '\0'; DBUG_PRINT("query",("%-.4096s",thd->query)); -#if defined(ENABLED_PROFILING) +#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) thd->profiling.set_query_source(thd->query, length); #endif @@ -1594,7 +1594,7 @@ static bool do_command(THD *thd) net_new_transaction(net); packet_length= my_net_read(net); -#if defined(ENABLED_PROFILING) +#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) thd->profiling.start_new_query(); #endif if (packet_length == packet_error) @@ -1642,7 +1642,7 @@ static bool do_command(THD *thd) return_value= dispatch_command(command, thd, packet+1, (uint) (packet_length)); out: -#if defined(ENABLED_PROFILING) +#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) thd->profiling.finish_current_query(); #endif DBUG_RETURN(return_value); @@ -1951,7 +1951,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, mysql_log.write(thd,command, format, thd->query_length, thd->query); DBUG_PRINT("query",("%-.4096s",thd->query)); -#if defined(ENABLED_PROFILING) +#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) thd->profiling.set_query_source(thd->query, thd->query_length); #endif @@ -1981,7 +1981,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, length--; } -#if defined(ENABLED_PROFILING) +#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) thd->profiling.finish_current_query(); thd->profiling.start_new_query("continuing"); thd->profiling.set_query_source(next_packet, length); @@ -2485,7 +2485,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. */ -#ifdef ENABLED_PROFILING +#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) thd->profiling.discard_current_query(); #endif break; @@ -2961,7 +2961,7 @@ mysql_execute_command(THD *thd) } case SQLCOM_SHOW_PROFILES: { -#ifdef ENABLED_PROFILING +#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) thd->profiling.discard_current_query(); res= thd->profiling.show_profiles(); if (res) |