diff options
| author | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-09-21 17:21:09 -0400 |
|---|---|---|
| committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-09-21 17:21:09 -0400 |
| commit | edbf9583ad978bae297eb5267d46e542df56f8df (patch) | |
| tree | 2424311529615286ab4218fe5dc1f4e10c5d65ac /include | |
| parent | a02642b66e06f95b80fa9ee592ba50eb61dc2f17 (diff) | |
| download | mariadb-git-hf-10.1.wsrep_debug.tar.gz | |
wsrep_debug now supports more debug information levelshf-10.1.wsrep_debug
Diffstat (limited to 'include')
| -rw-r--r-- | include/mysql/service_wsrep.h | 9 | ||||
| -rw-r--r-- | include/wsrep.h | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h index bc5b2c67cdc..d3e3652c8ae 100644 --- a/include/mysql/service_wsrep.h +++ b/include/mysql/service_wsrep.h @@ -74,7 +74,7 @@ struct wsrep_buf; extern struct wsrep_service_st { struct wsrep * (*get_wsrep_func)(); my_bool (*get_wsrep_certify_nonPK_func)(); - my_bool (*get_wsrep_debug_func)(); + int (*get_wsrep_debug_func)(); my_bool (*get_wsrep_drupal_282555_workaround_func)(); my_bool (*get_wsrep_recovery_func)(); my_bool (*get_wsrep_load_data_splitting_func)(); @@ -110,6 +110,7 @@ extern struct wsrep_service_st { int (*wsrep_trx_is_aborting_func)(MYSQL_THD thd); int (*wsrep_trx_order_before_func)(MYSQL_THD, MYSQL_THD); void (*wsrep_unlock_rollback_func)(); + ulong (*wsrep_thd_thread_id_func)(THD *thd); } *wsrep_service; #ifdef MYSQL_DYNAMIC_PLUGIN @@ -151,6 +152,7 @@ extern struct wsrep_service_st { #define wsrep_trx_is_aborting(T) wsrep_service->wsrep_trx_is_aborting_func(T) #define wsrep_trx_order_before(T1,T2) wsrep_service->wsrep_trx_order_before_func(T1,T2) #define wsrep_unlock_rollback() wsrep_service->wsrep_unlock_rollback_func() +#define wsrep_thd_thread_id(T) wsrep_service->wsrep_thd_thread_id_func(T) #define wsrep_debug get_wsrep_debug() #define wsrep_log_conflicts get_wsrep_log_conflicts() @@ -162,7 +164,7 @@ extern struct wsrep_service_st { #else -extern my_bool wsrep_debug; +extern int wsrep_debug; extern my_bool wsrep_log_conflicts; extern my_bool wsrep_certify_nonPK; extern my_bool wsrep_load_data_splitting; @@ -189,7 +191,7 @@ int wsrep_trx_order_before(MYSQL_THD thd1, MYSQL_THD thd2); long get_wsrep_protocol_version(); long long wsrep_thd_trx_seqno(THD *thd); my_bool get_wsrep_certify_nonPK(); -my_bool get_wsrep_debug(); +int get_wsrep_debug(); my_bool get_wsrep_drupal_282555_workaround(); my_bool get_wsrep_recovery(); my_bool get_wsrep_load_data_splitting(); @@ -208,6 +210,7 @@ void wsrep_thd_awake(THD *thd, my_bool signal); void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state); bool wsrep_thd_ignore_table(THD *thd); void wsrep_unlock_rollback(); +ulong wsrep_thd_thread_id(THD *thd); #endif diff --git a/include/wsrep.h b/include/wsrep.h index 0f5455c8d50..c2f37a9d02e 100644 --- a/include/wsrep.h +++ b/include/wsrep.h @@ -44,11 +44,14 @@ #define WSREP_INFO(...) WSREP_LOG(sql_print_information, ##__VA_ARGS__) #define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__) #define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__) +#define WSREP_DEBUGX(level, ...) \ + if (wsrep_debug >= level) WSREP_LOG(sql_print_information, ##__VA_ARGS__) #else #define IF_WSREP(A,B) B #define DBUG_ASSERT_IF_WSREP(A) #define WSREP_DEBUG(...) +#define WSREP_DEBUGX(...) #define WSREP_INFO(...) #define WSREP_WARN(...) #define WSREP_ERROR(...) |
