diff options
author | Vasil Dimov <vasil.dimov@oracle.com> | 2010-12-27 19:24:05 +0200 |
---|---|---|
committer | Vasil Dimov <vasil.dimov@oracle.com> | 2010-12-27 19:24:05 +0200 |
commit | 57c910ff6c417664710d24f74412aa0d0346c4c3 (patch) | |
tree | cedcd58bbc7f680f9bd46ca8b34d3c16f2da3869 /include | |
parent | c9951393a895772f8c62c76b3e85cfe2f3ebda67 (diff) | |
parent | 0a1433d7b0aa2c2d38169922817ab5010ec8e399 (diff) | |
download | mariadb-git-57c910ff6c417664710d24f74412aa0d0346c4c3.tar.gz |
Merge mysql-5.5-bugteam -> mysql-5.5-innodb
Diffstat (limited to 'include')
-rw-r--r-- | include/CMakeLists.txt | 4 | ||||
-rw-r--r-- | include/my_dbug.h | 3 | ||||
-rw-r--r-- | include/my_pthread.h | 4 | ||||
-rw-r--r-- | include/mysql/plugin_audit.h | 40 | ||||
-rw-r--r-- | include/mysql/plugin_audit.h.pp | 21 | ||||
-rw-r--r-- | include/mysql/psi/mysql_file.h | 2 |
6 files changed, 70 insertions, 4 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 5334fc0f5ae..e89929d159d 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -59,6 +59,4 @@ SET(HEADERS ) INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development) -INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development FILES_MATCHING PATTERN "*.h" ) - - +INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR}/mysql COMPONENT Development FILES_MATCHING PATTERN "*.h") diff --git a/include/my_dbug.h b/include/my_dbug.h index e1cb3252601..7f8f5a1578d 100644 --- a/include/my_dbug.h +++ b/include/my_dbug.h @@ -132,7 +132,8 @@ extern const char* _db_get_func_(void); #ifdef __WIN__ #define DBUG_SUICIDE() DBUG_ABORT() #else -#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL), pause()) +extern void _db_suicide_(); +#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_()) #endif #else /* No debugger */ diff --git a/include/my_pthread.h b/include/my_pthread.h index bec88a716fe..c71ad9bf321 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -214,7 +214,11 @@ int pthread_cancel(pthread_t thread); typedef void *(* pthread_handler)(void *); #define my_pthread_once_t pthread_once_t +#if defined(PTHREAD_ONCE_INITIALIZER) +#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INITIALIZER +#else #define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT +#endif #define my_pthread_once(C,F) pthread_once(C,F) /* Test first for RTS or FSU threads */ diff --git a/include/mysql/plugin_audit.h b/include/mysql/plugin_audit.h index 41505da64af..8811c832949 100644 --- a/include/mysql/plugin_audit.h +++ b/include/mysql/plugin_audit.h @@ -42,6 +42,8 @@ struct mysql_event LOG events occurs before emitting to the general query log. ERROR events occur before transmitting errors to the user. RESULT events occur after transmitting a resultset to the user. + STATUS events occur after transmitting a resultset or errors + to the user. */ #define MYSQL_AUDIT_GENERAL_CLASS 0 @@ -49,6 +51,7 @@ struct mysql_event #define MYSQL_AUDIT_GENERAL_LOG 0 #define MYSQL_AUDIT_GENERAL_ERROR 1 #define MYSQL_AUDIT_GENERAL_RESULT 2 +#define MYSQL_AUDIT_GENERAL_STATUS 3 struct mysql_event_general { @@ -68,6 +71,43 @@ struct mysql_event_general }; +/* + AUDIT CLASS : CONNECTION + + CONNECT occurs after authentication phase is completed. + DISCONNECT occurs after connection is terminated. + CHANGE_USER occurs after COM_CHANGE_USER RPC is completed. +*/ + +#define MYSQL_AUDIT_CONNECTION_CLASS 1 +#define MYSQL_AUDIT_CONNECTION_CLASSMASK (1 << MYSQL_AUDIT_CONNECTION_CLASS) +#define MYSQL_AUDIT_CONNECTION_CONNECT 0 +#define MYSQL_AUDIT_CONNECTION_DISCONNECT 1 +#define MYSQL_AUDIT_CONNECTION_CHANGE_USER 2 + +struct mysql_event_connection +{ + unsigned int event_class; + unsigned int event_subclass; + int status; + unsigned long thread_id; + const char *user; + unsigned int user_length; + const char *priv_user; + unsigned int priv_user_length; + const char *external_user; + unsigned int external_user_length; + const char *proxy_user; + unsigned int proxy_user_length; + const char *host; + unsigned int host_length; + const char *ip; + unsigned int ip_length; + const char *database; + unsigned int database_length; +}; + + /************************************************************************* Here we define the descriptor structure, that is referred from st_mysql_plugin. diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp index b48cbca2e87..0e5b97d8717 100644 --- a/include/mysql/plugin_audit.h.pp +++ b/include/mysql/plugin_audit.h.pp @@ -208,6 +208,27 @@ struct mysql_event_general unsigned long long general_time; unsigned long long general_rows; }; +struct mysql_event_connection +{ + unsigned int event_class; + unsigned int event_subclass; + int status; + unsigned long thread_id; + const char *user; + unsigned int user_length; + const char *priv_user; + unsigned int priv_user_length; + const char *external_user; + unsigned int external_user_length; + const char *proxy_user; + unsigned int proxy_user_length; + const char *host; + unsigned int host_length; + const char *ip; + unsigned int ip_length; + const char *database; + unsigned int database_length; +}; struct st_mysql_audit { int interface_version; diff --git a/include/mysql/psi/mysql_file.h b/include/mysql/psi/mysql_file.h index de145f642e1..6fc6689c47d 100644 --- a/include/mysql/psi/mysql_file.h +++ b/include/mysql/psi/mysql_file.h @@ -16,6 +16,8 @@ #ifndef MYSQL_FILE_H #define MYSQL_FILE_H +#include <my_global.h> + /* For strlen() */ #include <string.h> /* For MY_STAT */ |