diff options
Diffstat (limited to 'sql/sql_profile.h')
-rw-r--r-- | sql/sql_profile.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/sql/sql_profile.h b/sql/sql_profile.h index b21216f290f..6a97be5657c 100644 --- a/sql/sql_profile.h +++ b/sql/sql_profile.h @@ -1,6 +1,4 @@ -/* - Copyright (c) 2007 MySQL AB, 2009 Sun Microsystems, Inc. - Use is subject to license terms. +/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,19 +11,16 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _SQL_PROFILE_H #define _SQL_PROFILE_H -#ifndef __func__ -#ifdef __FUNCTION__ -#define __func__ __FUNCTION__ -#else -#define __func__ "unknown function" -#endif -#endif +class Item; +struct TABLE_LIST; +class THD; +typedef struct st_field_info ST_FIELD_INFO; +typedef struct st_schema_table ST_SCHEMA_TABLE; extern ST_FIELD_INFO query_profile_statistics_info[]; int fill_query_profile_statistics_info(THD *thd, TABLE_LIST *tables, Item *cond); @@ -44,8 +39,9 @@ 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) -#include "mysql_priv.h" +#if defined(ENABLED_PROFILING) +#include "sql_priv.h" +#include "unireg.h" #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h> @@ -86,7 +82,7 @@ public: for (i= first; i != NULL; i= after_i) { after_i= i->next; - my_free((char *) i, MYF(0)); + my_free(i); } elements= 0; } @@ -133,7 +129,7 @@ public: last= NULL; first= first->next; - my_free((char *)old_item, MYF(0)); + my_free(old_item); elements--; return ret; @@ -176,6 +172,8 @@ private: char *status; #ifdef HAVE_GETRUSAGE struct rusage rusage; +#elif defined(_WIN32) + FILETIME ftKernel, ftUser; #endif char *function; |