mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
don't flush dbug buffers for every assert
only do it before crashing. Otherwise it introduces a noticable slowdown and, most importantly, changes errno, when the caller doesn't expect it.
This commit is contained in:
@@ -102,8 +102,8 @@ extern const char* _db_get_func_(void);
|
|||||||
#define DBUG_END() _db_end_ ()
|
#define DBUG_END() _db_end_ ()
|
||||||
#define DBUG_LOCK_FILE _db_lock_file_()
|
#define DBUG_LOCK_FILE _db_lock_file_()
|
||||||
#define DBUG_UNLOCK_FILE _db_unlock_file_()
|
#define DBUG_UNLOCK_FILE _db_unlock_file_()
|
||||||
#define DBUG_ASSERT(A) ( _db_flush_(), assert(A) )
|
#define DBUG_ASSERT(A) do { if (!(A)) { _db_flush_(); assert(A); }} while (0)
|
||||||
#define DBUG_SLOW_ASSERT(A) ( _db_flush_(), assert(A) )
|
#define DBUG_SLOW_ASSERT(A) DBUG_ASSERT(A)
|
||||||
#define DBUG_ASSERT_EXISTS
|
#define DBUG_ASSERT_EXISTS
|
||||||
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
|
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
|
||||||
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
|
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
|
||||||
|
Reference in New Issue
Block a user