| my_config.h | | my_config.h | |
| | | | |
| skipping to change at line 589 | | skipping to change at line 589 | |
| #define WITH_MYISAMMRG_STORAGE_ENGINE 1 | | #define WITH_MYISAMMRG_STORAGE_ENGINE 1 | |
| #define WITH_HEAP_STORAGE_ENGINE 1 | | #define WITH_HEAP_STORAGE_ENGINE 1 | |
| #define WITH_CSV_STORAGE_ENGINE 1 | | #define WITH_CSV_STORAGE_ENGINE 1 | |
| #define WITH_PARTITION_STORAGE_ENGINE 1 | | #define WITH_PARTITION_STORAGE_ENGINE 1 | |
| #define WITH_PERFSCHEMA_STORAGE_ENGINE 1 | | #define WITH_PERFSCHEMA_STORAGE_ENGINE 1 | |
| /* #undef WITH_NDBCLUSTER_STORAGE_ENGINE */ | | /* #undef WITH_NDBCLUSTER_STORAGE_ENGINE */ | |
| #if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY) | | #if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY) | |
| # define HAVE_NDB_BINLOG 1 | | # define HAVE_NDB_BINLOG 1 | |
| #endif | | #endif | |
| | | | |
|
| #define DEFAULT_MYSQL_HOME "/home/ut/testing/mysql/5.5.13" | | #define DEFAULT_MYSQL_HOME "/home/ut/testing/mysql/5.5.14" | |
| #define SHAREDIR "/home/ut/testing/mysql/5.5.13/share" | | #define SHAREDIR "/home/ut/testing/mysql/5.5.14/share" | |
| #define DEFAULT_BASEDIR "/home/ut/testing/mysql/5.5.13" | | #define DEFAULT_BASEDIR "/home/ut/testing/mysql/5.5.14" | |
| #define MYSQL_DATADIR "/home/ut/testing/mysql/5.5.13/data" | | #define MYSQL_DATADIR "/home/ut/testing/mysql/5.5.14/data" | |
| #define DEFAULT_CHARSET_HOME "/home/ut/testing/mysql/5.5.13" | | #define DEFAULT_CHARSET_HOME "/home/ut/testing/mysql/5.5.14" | |
| #define PLUGINDIR "/home/ut/testing/mysql/5.5.13/lib/plugin" | | #define PLUGINDIR "/home/ut/testing/mysql/5.5.14/lib/plugin" | |
| #define DEFAULT_SYSCONFDIR "/home/ut/testing/mysql/5.5.13/etc" | | #define DEFAULT_SYSCONFDIR "/home/ut/testing/mysql/5.5.14/etc" | |
| | | | |
| /* #undef SO_EXT */ | | /* #undef SO_EXT */ | |
| | | | |
| #define MYSQL_MAJOR_VERSION 5 | | #define MYSQL_MAJOR_VERSION 5 | |
| #define MYSQL_MINOR_VERSION 5 | | #define MYSQL_MINOR_VERSION 5 | |
| | | | |
| #define PACKAGE "mysql" | | #define PACKAGE "mysql" | |
| #define PACKAGE_BUGREPORT "" | | #define PACKAGE_BUGREPORT "" | |
| #define PACKAGE_NAME "MySQL Server" | | #define PACKAGE_NAME "MySQL Server" | |
|
| #define PACKAGE_STRING "MySQL Server 5.5.13" | | #define PACKAGE_STRING "MySQL Server 5.5.14" | |
| #define PACKAGE_TARNAME "mysql" | | #define PACKAGE_TARNAME "mysql" | |
|
| #define PACKAGE_VERSION "5.5.13" | | #define PACKAGE_VERSION "5.5.14" | |
| #define VERSION "5.5.13" | | #define VERSION "5.5.14" | |
| #define PROTOCOL_VERSION 10 | | #define PROTOCOL_VERSION 10 | |
| | | | |
| /* time_t related defines */ | | /* time_t related defines */ | |
| | | | |
| #define SIZEOF_TIME_T 4 | | #define SIZEOF_TIME_T 4 | |
| /* #undef TIME_T_UNSIGNED */ | | /* #undef TIME_T_UNSIGNED */ | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 10 lines changed or deleted | | 10 lines changed or added | |
|
| my_getopt.h | | my_getopt.h | |
|
| /* Copyright (C) 2002-2004 MySQL AB | | /* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reser
ved. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | 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 | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A */ | | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US
A */ | |
| | | | |
| #ifndef _my_getopt_h | | #ifndef _my_getopt_h | |
| #define _my_getopt_h | | #define _my_getopt_h | |
| | | | |
| #include "my_sys.h" /* loglevel */ | | #include "my_sys.h" /* loglevel */ | |
| | | | |
| C_MODE_START | | C_MODE_START | |
| | | | |
| #define GET_NO_ARG 1 | | #define GET_NO_ARG 1 | |
| #define GET_BOOL 2 | | #define GET_BOOL 2 | |
| | | | |
| skipping to change at line 88 | | skipping to change at line 88 | |
| enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG *
/ | | enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG *
/ | |
| longlong def_value; /**< Default value */ | | longlong def_value; /**< Default value */ | |
| longlong min_value; /**< Min allowed value (for numbers
) */ | | longlong min_value; /**< Min allowed value (for numbers
) */ | |
| longlong max_value; /**< Max allowed value (for numbers
) */ | | longlong max_value; /**< Max allowed value (for numbers
) */ | |
| longlong sub_size; /**< Unused
*/ | | longlong sub_size; /**< Unused
*/ | |
| long block_size; /**< Value should be a mult. of thi
s (for numbers) */ | | long block_size; /**< Value should be a mult. of thi
s (for numbers) */ | |
| void *app_type; /**< To be used by an application *
/ | | void *app_type; /**< To be used by an application *
/ | |
| }; | | }; | |
| | | | |
| typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *)
; | | typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *)
; | |
|
| typedef void (*my_error_reporter)(enum loglevel level, const char *format, | | typedef void (*my_error_reporter)(enum loglevel level, const char *format, | |
| ...); | | ...) | |
| | | ATTRIBUTE_FORMAT_FPTR(printf, 2, 3); | |
| | | | |
| /** | | /** | |
| Used to retrieve a reference to the object (variable) that holds the valu
e | | Used to retrieve a reference to the object (variable) that holds the valu
e | |
| for the given option. For example, if var_type is GET_UINT, the function | | for the given option. For example, if var_type is GET_UINT, the function | |
| must return a pointer to a variable of type uint. A argument is stored in | | must return a pointer to a variable of type uint. A argument is stored in | |
| the location pointed to by the returned pointer. | | the location pointed to by the returned pointer. | |
| */ | | */ | |
| typedef void *(*my_getopt_value)(const char *, uint, const struct my_option
*, | | typedef void *(*my_getopt_value)(const char *, uint, const struct my_option
*, | |
| int *); | | int *); | |
| | | | |
| extern char *disabled_my_option; | | extern char *disabled_my_option; | |
| | | | |
End of changes. 3 change blocks. |
| 4 lines changed or deleted | | 6 lines changed or added | |
|
| my_sys.h | | my_sys.h | |
| | | | |
| skipping to change at line 627 | | skipping to change at line 627 | |
| | | | |
| extern void init_glob_errs(void); | | extern void init_glob_errs(void); | |
| extern const char** get_global_errmsgs(); | | extern const char** get_global_errmsgs(); | |
| extern void wait_for_free_space(const char *filename, int errors); | | extern void wait_for_free_space(const char *filename, int errors); | |
| extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags); | | extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags); | |
| extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags
); | | extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags
); | |
| extern FILE *my_freopen(const char *path, const char *mode, FILE *stream); | | extern FILE *my_freopen(const char *path, const char *mode, FILE *stream); | |
| extern int my_fclose(FILE *fd,myf MyFlags); | | extern int my_fclose(FILE *fd,myf MyFlags); | |
| extern File my_fileno(FILE *fd); | | extern File my_fileno(FILE *fd); | |
| extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); | | extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); | |
|
| | | extern void thr_set_sync_wait_callback(void (*before_sync)(void), | |
| | | void (*after_sync)(void)); | |
| extern int my_sync(File fd, myf my_flags); | | extern int my_sync(File fd, myf my_flags); | |
| extern int my_sync_dir(const char *dir_name, myf my_flags); | | extern int my_sync_dir(const char *dir_name, myf my_flags); | |
| extern int my_sync_dir_by_file(const char *file_name, myf my_flags); | | extern int my_sync_dir_by_file(const char *file_name, myf my_flags); | |
| extern void my_error(int nr,myf MyFlags, ...); | | extern void my_error(int nr,myf MyFlags, ...); | |
| extern void my_printf_error(uint my_err, const char *format, | | extern void my_printf_error(uint my_err, const char *format, | |
| myf MyFlags, ...) | | myf MyFlags, ...) | |
| ATTRIBUTE_FORMAT(printf, 2, 4); | | ATTRIBUTE_FORMAT(printf, 2, 4); | |
| extern void my_printv_error(uint error, const char *format, myf MyFlags, | | extern void my_printv_error(uint error, const char *format, myf MyFlags, | |
| va_list ap); | | va_list ap); | |
| extern int my_error_register(const char** (*get_errmsgs) (), | | extern int my_error_register(const char** (*get_errmsgs) (), | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 2 lines changed or added | |
|
| mysqld_ername.h | | mysqld_ername.h | |
| | | | |
| skipping to change at line 712 | | skipping to change at line 712 | |
| { "ER_SET_PASSWORD_AUTH_PLUGIN", 1699, "SET PASSWORD has no significance fo
r users authenticating via plugins" }, | | { "ER_SET_PASSWORD_AUTH_PLUGIN", 1699, "SET PASSWORD has no significance fo
r users authenticating via plugins" }, | |
| { "ER_GRANT_PLUGIN_USER_EXISTS", 1700, "GRANT with IDENTIFIED WITH is illeg
al because the user %-.*s already exists" }, | | { "ER_GRANT_PLUGIN_USER_EXISTS", 1700, "GRANT with IDENTIFIED WITH is illeg
al because the user %-.*s already exists" }, | |
| { "ER_TRUNCATE_ILLEGAL_FK", 1701, "Cannot truncate a table referenced in a
foreign key constraint (%.192s)" }, | | { "ER_TRUNCATE_ILLEGAL_FK", 1701, "Cannot truncate a table referenced in a
foreign key constraint (%.192s)" }, | |
| { "ER_PLUGIN_IS_PERMANENT", 1702, "Plugin \'%s\' is force_plus_permanent an
d can not be unloaded" }, | | { "ER_PLUGIN_IS_PERMANENT", 1702, "Plugin \'%s\' is force_plus_permanent an
d can not be unloaded" }, | |
| { "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN", 1703, "The requested value f
or the heartbeat period is less than 1 millisecond. The value is reset to 0
, meaning that heartbeating will effectively be disabled." }, | | { "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN", 1703, "The requested value f
or the heartbeat period is less than 1 millisecond. The value is reset to 0
, meaning that heartbeating will effectively be disabled." }, | |
| { "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX", 1704, "The requested value f
or the heartbeat period exceeds the value of `slave_net_timeout\' seconds.
A sensible value for the period should be less than the timeout." }, | | { "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX", 1704, "The requested value f
or the heartbeat period exceeds the value of `slave_net_timeout\' seconds.
A sensible value for the period should be less than the timeout." }, | |
| { "ER_STMT_CACHE_FULL", 1705, "Multi-row statements required more than \'ma
x_binlog_stmt_cache_size\' bytes of storage; increase this mysqld variable
and try again" }, | | { "ER_STMT_CACHE_FULL", 1705, "Multi-row statements required more than \'ma
x_binlog_stmt_cache_size\' bytes of storage; increase this mysqld variable
and try again" }, | |
| { "ER_MULTI_UPDATE_KEY_CONFLICT", 1706, "Primary key/partition key update i
s not allowed since the table is updated both as \'%-.192s\' and \'%-.192s\
'." }, | | { "ER_MULTI_UPDATE_KEY_CONFLICT", 1706, "Primary key/partition key update i
s not allowed since the table is updated both as \'%-.192s\' and \'%-.192s\
'." }, | |
| { "ER_TABLE_NEEDS_REBUILD", 1707, "Table rebuild required. Please do \"ALTE
R TABLE `%-.32s` FORCE\" or dump/reload to fix it!" }, | | { "ER_TABLE_NEEDS_REBUILD", 1707, "Table rebuild required. Please do \"ALTE
R TABLE `%-.32s` FORCE\" or dump/reload to fix it!" }, | |
| { "WARN_OPTION_BELOW_LIMIT", 1708, "The value of \'%s\' should be no less t
han the value of \'%s\'" }, | | { "WARN_OPTION_BELOW_LIMIT", 1708, "The value of \'%s\' should be no less t
han the value of \'%s\'" }, | |
|
| | | { "ER_INDEX_COLUMN_TOO_LONG", 1709, "Index column size too large. The maxim
um column size is %lu bytes." }, | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 0 lines changed or added | |
|
| plugin_audit.h | | plugin_audit.h | |
|
| /* Copyright (C) 2007 MySQL AB | | /* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reser
ved. | |
| | | | |
|
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or | |
| it under the terms of the GNU General Public License as published by | | modify it under the terms of the GNU General Public License | |
| the Free Software Foundation; version 2 of the License. | | as published by the Free Software Foundation; version 2 of | |
| | | the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A */ | | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 U
SA */ | |
| | | | |
| #ifndef _my_audit_h | | #ifndef _my_audit_h | |
| #define _my_audit_h | | #define _my_audit_h | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| API for Audit plugin. (MYSQL_AUDIT_PLUGIN) | | API for Audit plugin. (MYSQL_AUDIT_PLUGIN) | |
| */ | | */ | |
| | | | |
| #include "plugin.h" | | #include "plugin.h" | |
| | | | |
| #define MYSQL_AUDIT_CLASS_MASK_SIZE 1 | | #define MYSQL_AUDIT_CLASS_MASK_SIZE 1 | |
| | | | |
|
| #define MYSQL_AUDIT_INTERFACE_VERSION 0x0200 | | #define MYSQL_AUDIT_INTERFACE_VERSION 0x0300 | |
| | | | |
| /* | | | |
| The first word in every event class struct indicates the specific | | | |
| class of the event. | | | |
| */ | | | |
| struct mysql_event | | | |
| { | | | |
| unsigned int event_class; | | | |
| }; | | | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| AUDIT CLASS : GENERAL | | AUDIT CLASS : GENERAL | |
| | | | |
| LOG events occurs before emitting to the general query log. | | LOG events occurs before emitting to the general query log. | |
| ERROR events occur before transmitting errors to the user. | | ERROR events occur before transmitting errors to the user. | |
| RESULT events occur after transmitting a resultset to the user. | | RESULT events occur after transmitting a resultset to the user. | |
| STATUS events occur after transmitting a resultset or errors | | STATUS events occur after transmitting a resultset or errors | |
| to the user. | | to the user. | |
| */ | | */ | |
| | | | |
| #define MYSQL_AUDIT_GENERAL_CLASS 0 | | #define MYSQL_AUDIT_GENERAL_CLASS 0 | |
| #define MYSQL_AUDIT_GENERAL_CLASSMASK (1 << MYSQL_AUDIT_GENERAL_CLASS) | | #define MYSQL_AUDIT_GENERAL_CLASSMASK (1 << MYSQL_AUDIT_GENERAL_CLASS) | |
| #define MYSQL_AUDIT_GENERAL_LOG 0 | | #define MYSQL_AUDIT_GENERAL_LOG 0 | |
| #define MYSQL_AUDIT_GENERAL_ERROR 1 | | #define MYSQL_AUDIT_GENERAL_ERROR 1 | |
| #define MYSQL_AUDIT_GENERAL_RESULT 2 | | #define MYSQL_AUDIT_GENERAL_RESULT 2 | |
| #define MYSQL_AUDIT_GENERAL_STATUS 3 | | #define MYSQL_AUDIT_GENERAL_STATUS 3 | |
| | | | |
| struct mysql_event_general | | struct mysql_event_general | |
| { | | { | |
|
| unsigned int event_class; | | | |
| unsigned int event_subclass; | | unsigned int event_subclass; | |
| int general_error_code; | | int general_error_code; | |
| unsigned long general_thread_id; | | unsigned long general_thread_id; | |
| const char *general_user; | | const char *general_user; | |
| unsigned int general_user_length; | | unsigned int general_user_length; | |
| const char *general_command; | | const char *general_command; | |
| unsigned int general_command_length; | | unsigned int general_command_length; | |
| const char *general_query; | | const char *general_query; | |
| unsigned int general_query_length; | | unsigned int general_query_length; | |
| struct charset_info_st *general_charset; | | struct charset_info_st *general_charset; | |
| | | | |
| skipping to change at line 88 | | skipping to change at line 79 | |
| */ | | */ | |
| | | | |
| #define MYSQL_AUDIT_CONNECTION_CLASS 1 | | #define MYSQL_AUDIT_CONNECTION_CLASS 1 | |
| #define MYSQL_AUDIT_CONNECTION_CLASSMASK (1 << MYSQL_AUDIT_CONNECTION_CLASS
) | | #define MYSQL_AUDIT_CONNECTION_CLASSMASK (1 << MYSQL_AUDIT_CONNECTION_CLASS
) | |
| #define MYSQL_AUDIT_CONNECTION_CONNECT 0 | | #define MYSQL_AUDIT_CONNECTION_CONNECT 0 | |
| #define MYSQL_AUDIT_CONNECTION_DISCONNECT 1 | | #define MYSQL_AUDIT_CONNECTION_DISCONNECT 1 | |
| #define MYSQL_AUDIT_CONNECTION_CHANGE_USER 2 | | #define MYSQL_AUDIT_CONNECTION_CHANGE_USER 2 | |
| | | | |
| struct mysql_event_connection | | struct mysql_event_connection | |
| { | | { | |
|
| unsigned int event_class; | | | |
| unsigned int event_subclass; | | unsigned int event_subclass; | |
| int status; | | int status; | |
| unsigned long thread_id; | | unsigned long thread_id; | |
| const char *user; | | const char *user; | |
| unsigned int user_length; | | unsigned int user_length; | |
| const char *priv_user; | | const char *priv_user; | |
| unsigned int priv_user_length; | | unsigned int priv_user_length; | |
| const char *external_user; | | const char *external_user; | |
| unsigned int external_user_length; | | unsigned int external_user_length; | |
| const char *proxy_user; | | const char *proxy_user; | |
| | | | |
| skipping to change at line 118 | | skipping to change at line 108 | |
| /************************************************************************* | | /************************************************************************* | |
| Here we define the descriptor structure, that is referred from | | Here we define the descriptor structure, that is referred from | |
| st_mysql_plugin. | | st_mysql_plugin. | |
| | | | |
| release_thd() event occurs when the event class consumer is to be | | release_thd() event occurs when the event class consumer is to be | |
| disassociated from the specified THD. This would typically occur | | disassociated from the specified THD. This would typically occur | |
| before some operation which may require sleeping - such as when | | before some operation which may require sleeping - such as when | |
| waiting for the next query from the client. | | waiting for the next query from the client. | |
| | | | |
| event_notify() is invoked whenever an event occurs which is of any | | event_notify() is invoked whenever an event occurs which is of any | |
|
| class for which the plugin has interest. The first word of the | | class for which the plugin has interest. The second argument | |
| mysql_event argument indicates the specific event class and the | | indicates the specific event class and the third argument is data | |
| remainder of the structure is as required for that class. | | as required for that class. | |
| | | | |
| class_mask is an array of bits used to indicate what event classes | | class_mask is an array of bits used to indicate what event classes | |
| that this plugin wants to receive. | | that this plugin wants to receive. | |
| */ | | */ | |
| | | | |
| struct st_mysql_audit | | struct st_mysql_audit | |
| { | | { | |
| int interface_version; | | int interface_version; | |
| void (*release_thd)(MYSQL_THD); | | void (*release_thd)(MYSQL_THD); | |
|
| void (*event_notify)(MYSQL_THD, const struct mysql_event *); | | void (*event_notify)(MYSQL_THD, unsigned int, const void *); | |
| unsigned long class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE]; | | unsigned long class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE]; | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 9 change blocks. |
| 22 lines changed or deleted | | 12 lines changed or added | |
|
| service_thd_wait.h | | service_thd_wait.h | |
| | | | |
| skipping to change at line 53 | | skipping to change at line 53 | |
| | | | |
| Using thd_wait_...() service is optional but recommended. Using it will | | Using thd_wait_...() service is optional but recommended. Using it will | |
| improve performance as the thread pool will be more active at managing th
e | | improve performance as the thread pool will be more active at managing th
e | |
| thread workload. | | thread workload. | |
| */ | | */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| | | /* | |
| | | One should only report wait events that could potentially block for a | |
| | | long time. A mutex wait is too short of an event to report. The reason | |
| | | is that an event which is reported leads to a new thread starts | |
| | | executing a query and this has a negative impact of usage of CPU caches | |
| | | and thus the expected gain of starting a new thread must be higher than | |
| | | the expected cost of lost performance due to starting a new thread. | |
| | | | |
| | | Good examples of events that should be reported are waiting for row locks | |
| | | that could easily be for many milliseconds or even seconds and the same | |
| | | holds true for global read locks, table locks and other meta data locks. | |
| | | Another event of interest is going to sleep for an extended time. | |
| | | */ | |
| typedef enum _thd_wait_type_e { | | typedef enum _thd_wait_type_e { | |
|
| THD_WAIT_MUTEX= 1, | | THD_WAIT_SLEEP= 1, | |
| THD_WAIT_DISKIO= 2, | | THD_WAIT_DISKIO= 2, | |
|
| THD_WAIT_ROW_TABLE_LOCK= 3, | | THD_WAIT_ROW_LOCK= 3, | |
| THD_WAIT_GLOBAL_LOCK= 4 | | THD_WAIT_GLOBAL_LOCK= 4, | |
| | | THD_WAIT_META_DATA_LOCK= 5, | |
| | | THD_WAIT_TABLE_LOCK= 6, | |
| | | THD_WAIT_USER_LOCK= 7, | |
| | | THD_WAIT_BINLOG= 8, | |
| | | THD_WAIT_GROUP_COMMIT= 9, | |
| | | THD_WAIT_SYNC= 10, | |
| | | THD_WAIT_LAST= 11 | |
| } thd_wait_type; | | } thd_wait_type; | |
| | | | |
| extern struct thd_wait_service_st { | | extern struct thd_wait_service_st { | |
|
| void (*thd_wait_begin_func)(MYSQL_THD, thd_wait_type); | | void (*thd_wait_begin_func)(MYSQL_THD, int); | |
| void (*thd_wait_end_func)(MYSQL_THD); | | void (*thd_wait_end_func)(MYSQL_THD); | |
| } *thd_wait_service; | | } *thd_wait_service; | |
| | | | |
| #ifdef MYSQL_DYNAMIC_PLUGIN | | #ifdef MYSQL_DYNAMIC_PLUGIN | |
| | | | |
| #define thd_wait_begin(_THD, _WAIT_TYPE) \ | | #define thd_wait_begin(_THD, _WAIT_TYPE) \ | |
| thd_wait_service->thd_wait_begin_func(_THD, _WAIT_TYPE) | | thd_wait_service->thd_wait_begin_func(_THD, _WAIT_TYPE) | |
| #define thd_wait_end(_THD) thd_wait_service->thd_wait_end_func(_THD) | | #define thd_wait_end(_THD) thd_wait_service->thd_wait_end_func(_THD) | |
| | | | |
| #else | | #else | |
| | | | |
|
| void thd_wait_begin(MYSQL_THD thd, thd_wait_type wait_type); | | void thd_wait_begin(MYSQL_THD thd, int wait_type); | |
| void thd_wait_end(MYSQL_THD thd); | | void thd_wait_end(MYSQL_THD thd); | |
| | | | |
| #endif | | #endif | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 5 change blocks. |
| 5 lines changed or deleted | | 25 lines changed or added | |
|