1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Pull 5.1 treatment of community features into 5.0.

This commit is contained in:
Chad MILLER
2009-05-05 17:03:23 -04:00
parent 978e8e06b0
commit 9d58239dea
17 changed files with 88 additions and 27 deletions

View File

@ -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)