diff options
Diffstat (limited to 'include/mysql')
-rw-r--r-- | include/mysql/plugin.h | 2 | ||||
-rw-r--r-- | include/mysql/plugin_audit.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/plugin_auth.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/plugin_data_type.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/plugin_encryption.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/plugin_ftparser.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/plugin_function.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/plugin_password_validation.h.pp | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_socket.h | 60 | ||||
-rw-r--r-- | include/mysql/psi/mysql_thread.h | 294 | ||||
-rw-r--r-- | include/mysql/service_wsrep.h | 12 |
11 files changed, 142 insertions, 240 deletions
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index d9aef6ac11c..89ecf2b34c1 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -674,6 +674,8 @@ int thd_in_lock_tables(const MYSQL_THD thd); int thd_tablespace_op(const MYSQL_THD thd); long long thd_test_options(const MYSQL_THD thd, long long test_options); int thd_sql_command(const MYSQL_THD thd); +struct DDL_options_st; +struct DDL_options_st *thd_ddl_options(const MYSQL_THD thd); void thd_storage_lock_wait(MYSQL_THD thd, long long value); int thd_tx_isolation(const MYSQL_THD thd); int thd_tx_is_read_only(const MYSQL_THD thd); diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp index fbc73389c34..26799e9031a 100644 --- a/include/mysql/plugin_audit.h.pp +++ b/include/mysql/plugin_audit.h.pp @@ -618,6 +618,8 @@ int thd_in_lock_tables(const THD* thd); int thd_tablespace_op(const THD* thd); long long thd_test_options(const THD* thd, long long test_options); int thd_sql_command(const THD* thd); +struct DDL_options_st; +struct DDL_options_st *thd_ddl_options(const THD* thd); void thd_storage_lock_wait(THD* thd, long long value); int thd_tx_isolation(const THD* thd); int thd_tx_is_read_only(const THD* thd); diff --git a/include/mysql/plugin_auth.h.pp b/include/mysql/plugin_auth.h.pp index 45d4c0f0961..31b3f723fff 100644 --- a/include/mysql/plugin_auth.h.pp +++ b/include/mysql/plugin_auth.h.pp @@ -618,6 +618,8 @@ int thd_in_lock_tables(const THD* thd); int thd_tablespace_op(const THD* thd); long long thd_test_options(const THD* thd, long long test_options); int thd_sql_command(const THD* thd); +struct DDL_options_st; +struct DDL_options_st *thd_ddl_options(const THD* thd); void thd_storage_lock_wait(THD* thd, long long value); int thd_tx_isolation(const THD* thd); int thd_tx_is_read_only(const THD* thd); diff --git a/include/mysql/plugin_data_type.h.pp b/include/mysql/plugin_data_type.h.pp index 77da7e44a08..4716b0dc255 100644 --- a/include/mysql/plugin_data_type.h.pp +++ b/include/mysql/plugin_data_type.h.pp @@ -618,6 +618,8 @@ int thd_in_lock_tables(const THD* thd); int thd_tablespace_op(const THD* thd); long long thd_test_options(const THD* thd, long long test_options); int thd_sql_command(const THD* thd); +struct DDL_options_st; +struct DDL_options_st *thd_ddl_options(const THD* thd); void thd_storage_lock_wait(THD* thd, long long value); int thd_tx_isolation(const THD* thd); int thd_tx_is_read_only(const THD* thd); diff --git a/include/mysql/plugin_encryption.h.pp b/include/mysql/plugin_encryption.h.pp index bd91cacfd06..c29dc20efda 100644 --- a/include/mysql/plugin_encryption.h.pp +++ b/include/mysql/plugin_encryption.h.pp @@ -618,6 +618,8 @@ int thd_in_lock_tables(const THD* thd); int thd_tablespace_op(const THD* thd); long long thd_test_options(const THD* thd, long long test_options); int thd_sql_command(const THD* thd); +struct DDL_options_st; +struct DDL_options_st *thd_ddl_options(const THD* thd); void thd_storage_lock_wait(THD* thd, long long value); int thd_tx_isolation(const THD* thd); int thd_tx_is_read_only(const THD* thd); diff --git a/include/mysql/plugin_ftparser.h.pp b/include/mysql/plugin_ftparser.h.pp index de50fa7de28..be270d096f4 100644 --- a/include/mysql/plugin_ftparser.h.pp +++ b/include/mysql/plugin_ftparser.h.pp @@ -570,6 +570,8 @@ int thd_in_lock_tables(const THD* thd); int thd_tablespace_op(const THD* thd); long long thd_test_options(const THD* thd, long long test_options); int thd_sql_command(const THD* thd); +struct DDL_options_st; +struct DDL_options_st *thd_ddl_options(const THD* thd); void thd_storage_lock_wait(THD* thd, long long value); int thd_tx_isolation(const THD* thd); int thd_tx_is_read_only(const THD* thd); diff --git a/include/mysql/plugin_function.h.pp b/include/mysql/plugin_function.h.pp index fea967ec355..7a2d06918c9 100644 --- a/include/mysql/plugin_function.h.pp +++ b/include/mysql/plugin_function.h.pp @@ -618,6 +618,8 @@ int thd_in_lock_tables(const THD* thd); int thd_tablespace_op(const THD* thd); long long thd_test_options(const THD* thd, long long test_options); int thd_sql_command(const THD* thd); +struct DDL_options_st; +struct DDL_options_st *thd_ddl_options(const THD* thd); void thd_storage_lock_wait(THD* thd, long long value); int thd_tx_isolation(const THD* thd); int thd_tx_is_read_only(const THD* thd); diff --git a/include/mysql/plugin_password_validation.h.pp b/include/mysql/plugin_password_validation.h.pp index f0035d8f21a..39218d737a2 100644 --- a/include/mysql/plugin_password_validation.h.pp +++ b/include/mysql/plugin_password_validation.h.pp @@ -618,6 +618,8 @@ int thd_in_lock_tables(const THD* thd); int thd_tablespace_op(const THD* thd); long long thd_test_options(const THD* thd, long long test_options); int thd_sql_command(const THD* thd); +struct DDL_options_st; +struct DDL_options_st *thd_ddl_options(const THD* thd); void thd_storage_lock_wait(THD* thd, long long value); int thd_tx_isolation(const THD* thd); int thd_tx_is_read_only(const THD* thd); diff --git a/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h index e32474db1dd..c78154b73db 100644 --- a/include/mysql/psi/mysql_socket.h +++ b/include/mysql/psi/mysql_socket.h @@ -75,6 +75,15 @@ struct st_mysql_socket /** The real socket descriptor. */ my_socket fd; + /** Is this a Unix-domain socket? */ + char is_unix_domain_socket; + + /** Is this a socket opened for the extra port? */ + char is_extra_port; + + /** Address family of the socket. (See sa_family from struct sockaddr). */ + unsigned short address_family; + /** The instrumentation hook. Note that this hook is not conditionally defined, @@ -105,7 +114,7 @@ typedef struct st_mysql_socket MYSQL_SOCKET; static inline MYSQL_SOCKET mysql_socket_invalid() { - MYSQL_SOCKET mysql_socket= {INVALID_SOCKET, NULL}; + MYSQL_SOCKET mysql_socket= {INVALID_SOCKET, 0, 0, 0, NULL}; return mysql_socket; } @@ -296,6 +305,22 @@ inline_mysql_socket_set_state(MYSQL_SOCKET socket, enum PSI_socket_state state) #endif /* HAVE_PSI_SOCKET_INTERFACE */ /** + @def mysql_socket_fd(K, F) + Create a socket. + @c mysql_socket_fd is a replacement for @c socket. + @param K PSI_socket_key for this instrumented socket + @param F File descriptor +*/ + +#ifdef HAVE_PSI_SOCKET_INTERFACE + #define mysql_socket_fd(K, F) \ + inline_mysql_socket_fd(K, F) +#else + #define mysql_socket_fd(K, F) \ + inline_mysql_socket_fd(F) +#endif + +/** @def mysql_socket_socket(K, D, T, P) Create a socket. @c mysql_socket_socket is a replacement for @c socket. @@ -569,6 +594,39 @@ static inline void inline_mysql_socket_register( } #endif +/** mysql_socket_fd */ + +static inline MYSQL_SOCKET +inline_mysql_socket_fd +( +#ifdef HAVE_PSI_SOCKET_INTERFACE + PSI_socket_key key, +#endif + int fd) +{ + MYSQL_SOCKET mysql_socket= MYSQL_INVALID_SOCKET; + mysql_socket.fd= fd; + + DBUG_ASSERT(mysql_socket.fd != INVALID_SOCKET); +#ifdef HAVE_PSI_SOCKET_INTERFACE + mysql_socket.m_psi= PSI_SOCKET_CALL(init_socket) + (key, (const my_socket*)&mysql_socket.fd, NULL, 0); +#endif + /** + Currently systemd socket activation is the user of this + function. Its API (man sd_listen_fds) says FD_CLOSE_EXEC + is already called. If there becomes another user, we + can call it again without detriment. + + If needed later: + #if defined(HAVE_FCNTL) && defined(FD_CLOEXEC) + (void) fcntl(mysql_socket.fd, F_SETFD, FD_CLOEXEC); + #endif + */ + + return mysql_socket; +} + /** mysql_socket_socket */ static inline MYSQL_SOCKET diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index 97ff29f8a0f..697c23ae423 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -1,5 +1,5 @@ /* Copyright (c) 2008, 2022, Oracle and/or its affiliates. - Copyright (c) 2020, MariaDB Corporation. + Copyright (c) 2020, 2021, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -727,6 +727,13 @@ static inline int inline_mysql_mutex_destroy( #endif } +#ifdef HAVE_PSI_MUTEX_INTERFACE +ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that, + const char *file, uint line); +ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that, + const char *file, uint line); +#endif + static inline int inline_mysql_mutex_lock( mysql_mutex_t *that #if defined(SAFE_MUTEX) || defined (HAVE_PSI_MUTEX_INTERFACE) @@ -734,40 +741,16 @@ static inline int inline_mysql_mutex_lock( #endif ) { - int result; - #ifdef HAVE_PSI_MUTEX_INTERFACE if (psi_likely(that->m_psi != NULL)) - { - /* Instrumentation start */ - PSI_mutex_locker *locker; - PSI_mutex_locker_state state; - locker= PSI_MUTEX_CALL(start_mutex_wait)(&state, that->m_psi, - PSI_MUTEX_LOCK, src_file, src_line); - - /* Instrumented code */ -#ifdef SAFE_MUTEX - result= safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); -#else - result= pthread_mutex_lock(&that->m_mutex); -#endif - - /* Instrumentation end */ - if (locker != NULL) - PSI_MUTEX_CALL(end_mutex_wait)(locker, result); - - return result; - } + return psi_mutex_lock(that, src_file, src_line); #endif - /* Non instrumented code */ #ifdef SAFE_MUTEX - result= safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); + return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); #else - result= pthread_mutex_lock(&that->m_mutex); + return pthread_mutex_lock(&that->m_mutex); #endif - - return result; } static inline int inline_mysql_mutex_trylock( @@ -777,40 +760,16 @@ static inline int inline_mysql_mutex_trylock( #endif ) { - int result; - #ifdef HAVE_PSI_MUTEX_INTERFACE if (psi_likely(that->m_psi != NULL)) - { - /* Instrumentation start */ - PSI_mutex_locker *locker; - PSI_mutex_locker_state state; - locker= PSI_MUTEX_CALL(start_mutex_wait)(&state, that->m_psi, - PSI_MUTEX_TRYLOCK, src_file, src_line); - - /* Instrumented code */ -#ifdef SAFE_MUTEX - result= safe_mutex_lock(&that->m_mutex, TRUE, src_file, src_line); -#else - result= pthread_mutex_trylock(&that->m_mutex); + return psi_mutex_trylock(that, src_file, src_line); #endif - - /* Instrumentation end */ - if (locker != NULL) - PSI_MUTEX_CALL(end_mutex_wait)(locker, result); - - return result; - } -#endif - /* Non instrumented code */ #ifdef SAFE_MUTEX - result= safe_mutex_lock(&that->m_mutex, TRUE, src_file, src_line); + return safe_mutex_lock(&that->m_mutex, TRUE, src_file, src_line); #else - result= pthread_mutex_trylock(&that->m_mutex); + return pthread_mutex_trylock(&that->m_mutex); #endif - - return result; } static inline int inline_mysql_mutex_unlock( @@ -914,6 +873,23 @@ static inline int inline_mysql_prlock_destroy( } #endif +#ifdef HAVE_PSI_RWLOCK_INTERFACE +ATTRIBUTE_COLD +int psi_rwlock_rdlock(mysql_rwlock_t *that, const char *file, uint line); +ATTRIBUTE_COLD +int psi_rwlock_tryrdlock(mysql_rwlock_t *that, const char *file, uint line); +ATTRIBUTE_COLD +int psi_rwlock_wrlock(mysql_rwlock_t *that, const char *file, uint line); +ATTRIBUTE_COLD +int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line); +# ifndef DISABLE_MYSQL_PRLOCK_H +ATTRIBUTE_COLD +int psi_prlock_rdlock(mysql_prlock_t *that, const char *file, uint line); +ATTRIBUTE_COLD +int psi_prlock_wrlock(mysql_prlock_t *that, const char *file, uint line); +# endif +#endif + static inline int inline_mysql_rwlock_rdlock( mysql_rwlock_t *that #ifdef HAVE_PSI_RWLOCK_INTERFACE @@ -921,32 +897,11 @@ static inline int inline_mysql_rwlock_rdlock( #endif ) { - int result; - #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) - { - /* Instrumentation start */ - PSI_rwlock_locker *locker; - PSI_rwlock_locker_state state; - locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)(&state, that->m_psi, - PSI_RWLOCK_READLOCK, src_file, src_line); - - /* Instrumented code */ - result= rw_rdlock(&that->m_rwlock); - - /* Instrumentation end */ - if (locker != NULL) - PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result); - - return result; - } + return psi_rwlock_rdlock(that, src_file, src_line); #endif - - /* Non instrumented code */ - result= rw_rdlock(&that->m_rwlock); - - return result; + return rw_rdlock(&that->m_rwlock); } #ifndef DISABLE_MYSQL_PRLOCK_H @@ -957,32 +912,11 @@ static inline int inline_mysql_prlock_rdlock( #endif ) { - int result; - #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) - { - /* Instrumentation start */ - PSI_rwlock_locker *locker; - PSI_rwlock_locker_state state; - locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)(&state, that->m_psi, - PSI_RWLOCK_READLOCK, src_file, src_line); - - /* Instrumented code */ - result= rw_pr_rdlock(&that->m_prlock); - - /* Instrumentation end */ - if (locker != NULL) - PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result); - - return result; - } + return psi_prlock_rdlock(that, src_file, src_line); #endif - - /* Non instrumented code */ - result= rw_pr_rdlock(&that->m_prlock); - - return result; + return rw_pr_rdlock(&that->m_prlock); } #endif @@ -993,32 +927,11 @@ static inline int inline_mysql_rwlock_wrlock( #endif ) { - int result; - #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) - { - /* Instrumentation start */ - PSI_rwlock_locker *locker; - PSI_rwlock_locker_state state; - locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)(&state, that->m_psi, - PSI_RWLOCK_WRITELOCK, src_file, src_line); - - /* Instrumented code */ - result= rw_wrlock(&that->m_rwlock); - - /* Instrumentation end */ - if (locker != NULL) - PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); - - return result; - } + return psi_rwlock_wrlock(that, src_file, src_line); #endif - - /* Non instrumented code */ - result= rw_wrlock(&that->m_rwlock); - - return result; + return rw_wrlock(&that->m_rwlock); } #ifndef DISABLE_MYSQL_PRLOCK_H @@ -1029,32 +942,11 @@ static inline int inline_mysql_prlock_wrlock( #endif ) { - int result; - #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) - { - /* Instrumentation start */ - PSI_rwlock_locker *locker; - PSI_rwlock_locker_state state; - locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)(&state, that->m_psi, - PSI_RWLOCK_WRITELOCK, src_file, src_line); - - /* Instrumented code */ - result= rw_pr_wrlock(&that->m_prlock); - - /* Instrumentation end */ - if (locker != NULL) - PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); - - return result; - } + return psi_prlock_wrlock(that, src_file, src_line); #endif - - /* Non instrumented code */ - result= rw_pr_wrlock(&that->m_prlock); - - return result; + return rw_pr_wrlock(&that->m_prlock); } #endif @@ -1065,32 +957,11 @@ static inline int inline_mysql_rwlock_tryrdlock( #endif ) { - int result; - #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) - { - /* Instrumentation start */ - PSI_rwlock_locker *locker; - PSI_rwlock_locker_state state; - locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)(&state, that->m_psi, - PSI_RWLOCK_TRYREADLOCK, src_file, src_line); - - /* Instrumented code */ - result= rw_tryrdlock(&that->m_rwlock); - - /* Instrumentation end */ - if (locker != NULL) - PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result); - - return result; - } + return psi_rwlock_tryrdlock(that, src_file, src_line); #endif - - /* Non instrumented code */ - result= rw_tryrdlock(&that->m_rwlock); - - return result; + return rw_tryrdlock(&that->m_rwlock); } static inline int inline_mysql_rwlock_trywrlock( @@ -1100,32 +971,11 @@ static inline int inline_mysql_rwlock_trywrlock( #endif ) { - int result; - #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) - { - /* Instrumentation start */ - PSI_rwlock_locker *locker; - PSI_rwlock_locker_state state; - locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)(&state, that->m_psi, - PSI_RWLOCK_TRYWRITELOCK, src_file, src_line); - - /* Instrumented code */ - result= rw_trywrlock(&that->m_rwlock); - - /* Instrumentation end */ - if (locker != NULL) - PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); - - return result; - } + return psi_rwlock_trywrlock(that, src_file, src_line); #endif - - /* Non instrumented code */ - result= rw_trywrlock(&that->m_rwlock); - - return result; + return rw_trywrlock(&that->m_rwlock); } static inline int inline_mysql_rwlock_unlock( @@ -1199,6 +1049,14 @@ static inline int inline_mysql_cond_destroy( return pthread_cond_destroy(&that->m_cond); } +#ifdef HAVE_PSI_COND_INTERFACE +ATTRIBUTE_COLD int psi_cond_wait(mysql_cond_t *that, mysql_mutex_t *mutex, + const char *file, uint line); +ATTRIBUTE_COLD int psi_cond_timedwait(mysql_cond_t *that, mysql_mutex_t *mutex, + const struct timespec *abstime, + const char *file, uint line); +#endif + static inline int inline_mysql_cond_wait( mysql_cond_t *that, mysql_mutex_t *mutex @@ -1207,32 +1065,11 @@ static inline int inline_mysql_cond_wait( #endif ) { - int result; - #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) - { - /* Instrumentation start */ - PSI_cond_locker *locker; - PSI_cond_locker_state state; - locker= PSI_COND_CALL(start_cond_wait)(&state, that->m_psi, mutex->m_psi, - PSI_COND_WAIT, src_file, src_line); - - /* Instrumented code */ - result= my_cond_wait(&that->m_cond, &mutex->m_mutex); - - /* Instrumentation end */ - if (locker != NULL) - PSI_COND_CALL(end_cond_wait)(locker, result); - - return result; - } + return psi_cond_wait(that, mutex, src_file, src_line); #endif - - /* Non instrumented code */ - result= my_cond_wait(&that->m_cond, &mutex->m_mutex); - - return result; + return my_cond_wait(&that->m_cond, &mutex->m_mutex); } static inline int inline_mysql_cond_timedwait( @@ -1244,32 +1081,11 @@ static inline int inline_mysql_cond_timedwait( #endif ) { - int result; - #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) - { - /* Instrumentation start */ - PSI_cond_locker *locker; - PSI_cond_locker_state state; - locker= PSI_COND_CALL(start_cond_wait)(&state, that->m_psi, mutex->m_psi, - PSI_COND_TIMEDWAIT, src_file, src_line); - - /* Instrumented code */ - result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime); - - /* Instrumentation end */ - if (psi_likely(locker != NULL)) - PSI_COND_CALL(end_cond_wait)(locker, result); - - return result; - } + return psi_cond_timedwait(that, mutex, abstime, src_file, src_line); #endif - - /* Non instrumented code */ - result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime); - - return result; + return my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime); } static inline int inline_mysql_cond_signal( diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h index 42b758c03f3..8541b348ae4 100644 --- a/include/mysql/service_wsrep.h +++ b/include/mysql/service_wsrep.h @@ -69,6 +69,9 @@ extern struct wsrep_service_st { void (*wsrep_thd_self_abort_func)(MYSQL_THD thd); int (*wsrep_thd_append_key_func)(MYSQL_THD thd, const struct wsrep_key* key, int n_keys, enum Wsrep_service_key_type); + int (*wsrep_thd_append_table_key_func)(MYSQL_THD thd, const char* db, + const char* table, enum Wsrep_service_key_type); + my_bool (*wsrep_thd_is_local_transaction)(const MYSQL_THD thd); const char* (*wsrep_thd_client_state_str_func)(const MYSQL_THD thd); const char* (*wsrep_thd_client_mode_str_func)(const MYSQL_THD thd); const char* (*wsrep_thd_transaction_state_str_func)(const MYSQL_THD thd); @@ -121,6 +124,8 @@ extern struct wsrep_service_st { #define wsrep_thd_is_local(T) wsrep_service->wsrep_thd_is_local_func(T) #define wsrep_thd_self_abort(T) wsrep_service->wsrep_thd_self_abort_func(T) #define wsrep_thd_append_key(T,W,N,K) wsrep_service->wsrep_thd_append_key_func(T,W,N,K) +#define wsrep_thd_append_table_key(T,D,B,K) wsrep_service->wsrep_thd_append_table_key_func(T,D,B,K) +#define wsrep_thd_is_local_transaction(T) wsrep_service->wsrep_thd_is_local_transaction_func(T) #define wsrep_thd_client_state_str(T) wsrep_service->wsrep_thd_client_state_str_func(T) #define wsrep_thd_client_mode_str(T) wsrep_service->wsrep_thd_client_mode_str_func(T) #define wsrep_thd_transaction_state_str(T) wsrep_service->wsrep_thd_transaction_state_str_func(T) @@ -226,6 +231,13 @@ extern "C" int wsrep_thd_append_key(MYSQL_THD thd, int n_keys, enum Wsrep_service_key_type); +extern "C" int wsrep_thd_append_table_key(MYSQL_THD thd, + const char* db, + const char* table, + enum Wsrep_service_key_type); + +extern "C" my_bool wsrep_thd_is_local_transaction(const MYSQL_THD thd); + extern const char* wsrep_sr_table_name_full; extern "C" const char* wsrep_get_sr_table_name(); |