diff options
author | Seppo Jaakola <seppo.jaakola@codership.com> | 2012-11-28 17:38:32 +0200 |
---|---|---|
committer | Seppo Jaakola <seppo.jaakola@codership.com> | 2012-11-28 17:38:32 +0200 |
commit | fc6cd855e9dd1b89a45f6584b3bd21ddc1f60607 (patch) | |
tree | 2a377ec91affec1a730a51231408af2a50a7bb51 /sql/mdl.cc | |
parent | 9b47a442b5452cb6c541e312f78746e7739e9f42 (diff) | |
download | mariadb-git-fc6cd855e9dd1b89a45f6584b3bd21ddc1f60607.tar.gz |
References: lp:1066784 - Merged revisions 3810-3827 from lp:codership-mysql
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r-- | sql/mdl.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc index 8527c027937..e2c633b486e 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -3015,3 +3015,33 @@ void MDL_context::set_transaction_duration_for_all_locks() ticket->m_duration= MDL_TRANSACTION; #endif } +#ifdef WITH_WSREP +void MDL_ticket::wsrep_report(bool debug) +{ + if (debug) + { + WSREP_DEBUG("MDL ticket: type: %s space: %s db: %s name: %s (%s)", + (get_type() == MDL_INTENTION_EXCLUSIVE) ? "intention exclusive" : + ((get_type() == MDL_SHARED) ? "shared" : + ((get_type() == MDL_SHARED_HIGH_PRIO ? "shared high prio" : + ((get_type() == MDL_SHARED_READ) ? "shared read" : + ((get_type() == MDL_SHARED_WRITE) ? "shared write" : + ((get_type() == MDL_SHARED_NO_WRITE) ? "shared no write" : + ((get_type() == MDL_SHARED_NO_READ_WRITE) ? "shared no read write" : + ((get_type() == MDL_EXCLUSIVE) ? "exclusive" : + "UNKNOWN")))))))), + (m_lock->key.mdl_namespace() == MDL_key::GLOBAL) ? "GLOBAL" : + ((m_lock->key.mdl_namespace() == MDL_key::SCHEMA) ? "SCHEMA" : + ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "TABLE" : + ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "FUNCTION" : + ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "PROCEDURE" : + ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "TRIGGER" : + ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "EVENT" : + ((m_lock->key.mdl_namespace() == MDL_key::COMMIT) ? "COMMIT" : + (char *)"UNKNOWN"))))))), + m_lock->key.db_name(), + m_lock->key.name(), + m_lock->key.get_wait_state_name()); + } +} +#endif /* WITH_WSREP */ |