From ca23272e1e53e195169bec0609eb0168722e1879 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 27 Aug 2008 14:15:06 +0200 Subject: proc_info_hook, mysys access to thd->proc_info include/my_global.h: move __func__ definition to my_global.h include/my_sys.h: proc_info_hook mysys/my_static.c: proc_info_hook sql/mysqld.cc: proc_info_hook sql/sql_class.cc: support thd==0 in set_thd_proc_info sql/sql_profile.cc: move __func__ definition to my_global.h sql/sql_profile.h: move __func__ definition to my_global.h --- sql/sql_profile.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'sql/sql_profile.h') diff --git a/sql/sql_profile.h b/sql/sql_profile.h index b5537487d26..3ddec4e3811 100644 --- a/sql/sql_profile.h +++ b/sql/sql_profile.h @@ -16,27 +16,6 @@ #ifndef _SQL_PROFILE_H #define _SQL_PROFILE_H -#if __STDC_VERSION__ < 199901L -# if __GNUC__ >= 2 -# define __func__ __FUNCTION__ -# else -# define __func__ _unknown_func_ -extern const char * const _unknown_func_; -# endif -#elif defined(_MSC_VER) -# if _MSC_VER < 1300 -# define __func__ _unknown_func_ -extern const char * const _unknown_func_; -# else -# define __func__ __FUNCTION__ -# endif -#elif defined(__BORLANDC__) -# define __func__ __FUNC__ -#else -# define __func__ _unknown_func_ -extern const char * const _unknown_func_; -#endif - extern ST_FIELD_INFO query_profile_statistics_info[]; int fill_query_profile_statistics_info(THD *thd, TABLE_LIST *tables, Item *cond); int make_profile_table_for_show(THD *thd, ST_SCHEMA_TABLE *schema_table); -- cgit v1.2.1 From e9bce6c9d4bde35306b845e22e9b5ada69c4512f Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 29 Jan 2010 20:42:22 +0200 Subject: Patch set contributed by Alex Budovski (MCA) Fix for Bug#31173: mysqlslap.exe crashes if called without any parameters .bzrignore: Fixed .bzrignore rules. Many were simply not ignoring what they were meant to. client/mysqlslap.c: Fixed bug for Bug#31173: mysqlslap.exe crashes if called without any parameters The original patch could cause memory leaks and odd problems depending on how connection was made. This code ensures that all mysql_options() are set for each mysql_real_connect(). (This patch by Monty) mysys/my_thr_init.c: Fixed multiply-initialized critical section on Windows, due to code incorrectly checking the wrong field in an attempt to prevent multiple-initialization. sql-common/client.c: Don't use shared memory if it's not set (for example after failed mysql_real_connect). Ensure that mysql_close() resets all resources so that it's safe to call it twice. (Patch by monty, related to Bug#31173: mysqlslap.exe crashes if called without any parameters) sql/CMakeLists.txt: Added page fault counters for SHOW PROFILE on Windows. sql/mysqld.cc: Fixed attempt to set a NULL event. The code now only sets the event if appropriate (i.e. shared memory is being used) sql/sql_profile.cc: Added page fault counters for SHOW PROFILE on Windows. sql/sql_profile.h: Added page fault counters for SHOW PROFILE on Windows. sql/udf_example.def: Some cleanup functions were not exported from udf_example.dll, causing them to never be executed, and as a result multiple-initialization of kernel objects occurred and resources were not being freed correctly. storage/maria/ma_close.c: Condition variable share->key_del_cond was never being destroyed, while its containing heap block was being freed in maria_close(), leaking kernel resources. --- sql/sql_profile.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sql/sql_profile.h') diff --git a/sql/sql_profile.h b/sql/sql_profile.h index 3ddec4e3811..71237b59d96 100644 --- a/sql/sql_profile.h +++ b/sql/sql_profile.h @@ -36,6 +36,10 @@ int make_profile_table_for_show(THD *thd, ST_SCHEMA_TABLE *schema_table); #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) #include "mysql_priv.h" +#ifdef __WIN__ +#include +#endif + #ifdef HAVE_SYS_RESOURCE_H #include #endif @@ -165,6 +169,10 @@ private: char *status; #ifdef HAVE_GETRUSAGE struct rusage rusage; +#elif defined(__WIN__) + FILETIME ftKernel, ftUser; + IO_COUNTERS io_count; + PROCESS_MEMORY_COUNTERS mem_count; #endif char *function; -- cgit v1.2.1