1 #ifndef DEBUG_SYNC_INCLUDED
2 #define DEBUG_SYNC_INCLUDED
25 #include <my_global.h>
29 #if defined(ENABLED_DEBUG_SYNC)
32 #define DEBUG_SYNC(_thd_, _sync_point_name_) \
33 do { if (unlikely(opt_debug_sync_timeout)) \
34 debug_sync(_thd_, STRING_WITH_LEN(_sync_point_name_)); \
38 extern MYSQL_PLUGIN_IMPORT uint opt_debug_sync_timeout;
41 #define DEBUG_SYNC_DEFAULT_WAIT_TIMEOUT 300
44 extern int debug_sync_init(
void);
45 extern void debug_sync_end(
void);
46 extern void debug_sync_init_thread(THD *thd);
47 extern void debug_sync_end_thread(THD *thd);
48 extern void debug_sync(THD *thd,
const char *sync_point_name,
size_t name_len);
49 extern bool debug_sync_set_action(THD *thd,
const char *action_str,
size_t len);
53 #define DEBUG_SYNC(_thd_, _sync_point_name_)