summaryrefslogtreecommitdiff
path: root/include/my_dbug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_dbug.h')
-rw-r--r--include/my_dbug.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/my_dbug.h b/include/my_dbug.h
index 956a5504e86..34681fbc633 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -145,7 +145,23 @@ extern const char* _db_get_func_(void);
#define DBUG_CRASH_VOID_RETURN do { return; } while(0)
#endif
-#ifdef __cplusplus
+
+#ifdef EXTRA_DEBUG
+/**
+ Sync points allow us to force the server to reach a certain line of code
+ and block there until the client tells the server it is ok to go on.
+ The client tells the server to block with SELECT GET_LOCK()
+ and unblocks it with SELECT RELEASE_LOCK(). Used for debugging difficult
+ concurrency problems
+*/
+#define DBUG_SYNC_POINT(lock_name,lock_timeout) \
+ debug_sync_point(lock_name,lock_timeout)
+void debug_sync_point(const char* lock_name, uint lock_timeout);
+#else
+#define DBUG_SYNC_POINT(lock_name,lock_timeout)
+#endif /* EXTRA_DEBUG */
+
+#ifdef __cplusplus
}
#endif
#endif