diff options
author | Monty <monty@mariadb.org> | 2017-07-03 11:35:44 +0300 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-08-24 01:05:50 +0200 |
commit | 536215e32fc43aa423684e9807640dcf3453924b (patch) | |
tree | d7249d3c4268c9a57becc5fea554e2379ffe1cf1 /sql/mdl.cc | |
parent | 52a1e4d613a6c7de759e93da8dfbd8cac08a11ee (diff) | |
download | mariadb-git-536215e32fc43aa423684e9807640dcf3453924b.tar.gz |
Added DBUG_ASSERT_AS_PRINTF compile flag
If compiling a non DBUG binary with
-DDBUG_ASSERT_AS_PRINTF asserts will be
changed to printf + stack trace (of stack
trace are enabled).
- Changed #ifndef DBUG_OFF to
#ifdef DBUG_ASSERT_EXISTS
for those DBUG_OFF that was just used to enable
assert
- Assert checking that could greatly impact
performance where changed to DBUG_ASSERT_SLOW which
is not affected by DBUG_ASSERT_AS_PRINTF
- Added one extra option to my_print_stacktrace() to
get more silent in case of stack trace printing as
part of assert.
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r-- | sql/mdl.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc index 350d27298de..4efc8b0e361 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -2119,11 +2119,11 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout) the parallel replication scheduler should never schedule a DDL while DML's are still running. */ - DBUG_ASSERT((mdl_request->type != MDL_INTENTION_EXCLUSIVE && - mdl_request->type != MDL_EXCLUSIVE) || - !(get_thd()->rgi_slave && - get_thd()->rgi_slave->is_parallel_exec && - lock->check_if_conflicting_replication_locks(this))); + DBUG_SLOW_ASSERT((mdl_request->type != MDL_INTENTION_EXCLUSIVE && + mdl_request->type != MDL_EXCLUSIVE) || + !(get_thd()->rgi_slave && + get_thd()->rgi_slave->is_parallel_exec && + lock->check_if_conflicting_replication_locks(this))); mysql_prlock_unlock(&lock->m_rwlock); @@ -2644,7 +2644,7 @@ void MDL_context::release_lock(enum_mdl_duration duration, MDL_ticket *ticket) void MDL_context::release_lock(MDL_ticket *ticket) { - DBUG_ASSERT(ticket->m_duration == MDL_EXPLICIT); + DBUG_SLOW_ASSERT(ticket->m_duration == MDL_EXPLICIT); release_lock(MDL_EXPLICIT, ticket); } @@ -2904,8 +2904,8 @@ bool MDL_context::has_lock(const MDL_savepoint &mdl_savepoint, void MDL_context::set_lock_duration(MDL_ticket *mdl_ticket, enum_mdl_duration duration) { - DBUG_ASSERT(mdl_ticket->m_duration == MDL_TRANSACTION && - duration != MDL_TRANSACTION); + DBUG_SLOW_ASSERT(mdl_ticket->m_duration == MDL_TRANSACTION && + duration != MDL_TRANSACTION); m_tickets[MDL_TRANSACTION].remove(mdl_ticket); m_tickets[duration].push_front(mdl_ticket); |