summaryrefslogtreecommitdiff
path: root/mysys/thr_mutex.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-09-02 12:41:20 +0300
committerMichael Widenius <monty@askmonty.org>2011-09-02 12:41:20 +0300
commit13e4d54795c2e49e4a8654964de1ab899eae2b23 (patch)
tree1b44a4a1a65f94e6bec7900078001cbfee820eac /mysys/thr_mutex.c
parent37a8497d494ea256ff4b13a89e62150e06a17dae (diff)
downloadmariadb-git-13e4d54795c2e49e4a8654964de1ab899eae2b23.tar.gz
Fixed lp:814238 "safe_mutex issues must be assertions in debug binary"
Added --debug-assert-on-error variable which, if set, will cause safe_mutex to assert if it founds an error. include/my_sys.h: Added my_assert_on_error mysys/my_static.c: Added my_assert_on_error mysys/thr_mutex.c: Assert when found wrong mutex usage if my_assert_on_error is set sql/mysqld.cc: Added setting of my_assert_on_error
Diffstat (limited to 'mysys/thr_mutex.c')
-rw-r--r--mysys/thr_mutex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c
index 9421a3b2d98..d284badfef4 100644
--- a/mysys/thr_mutex.c
+++ b/mysys/thr_mutex.c
@@ -836,6 +836,7 @@ static void print_deadlock_warning(safe_mutex_t *new_mutex,
mutex_root->file, mutex_root->line));
}
fflush(stderr);
+ DBUG_ASSERT(my_assert_on_error == 0);
DBUG_VOID_RETURN;
}