summaryrefslogtreecommitdiff
path: root/sql/mdl.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mdl.h')
-rw-r--r--sql/mdl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/mdl.h b/sql/mdl.h
index 87982bc6af1..03631bb9dd6 100644
--- a/sql/mdl.h
+++ b/sql/mdl.h
@@ -254,6 +254,10 @@ public:
mdl_cached_object_release_hook release_hook);
const MDL_context *get_ctx() const { return m_ctx; }
bool is_shared() const { return m_type < MDL_EXCLUSIVE; }
+ bool is_upgradable_or_exclusive() const
+ {
+ return m_type == MDL_SHARED_UPGRADABLE || m_type == MDL_EXCLUSIVE;
+ }
bool upgrade_shared_lock_to_exclusive();
void downgrade_exclusive_lock();
private: