summaryrefslogtreecommitdiff
path: root/sql/rpl_mi.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/rpl_mi.cc')
-rw-r--r--sql/rpl_mi.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc
index cda876ee764..646593ed98f 100644
--- a/sql/rpl_mi.cc
+++ b/sql/rpl_mi.cc
@@ -50,6 +50,14 @@ Master_info::Master_info(bool is_slave_recovery)
mysql_cond_init(key_master_info_data_cond, &data_cond, NULL);
mysql_cond_init(key_master_info_start_cond, &start_cond, NULL);
mysql_cond_init(key_master_info_stop_cond, &stop_cond, NULL);
+
+#ifdef SAFE_MUTEX
+ /* Define mutex order for locks to find wrong lock usage */
+ mysql_mutex_lock(&data_lock);
+ mysql_mutex_lock(&run_lock);
+ mysql_mutex_unlock(&run_lock);
+ mysql_mutex_unlock(&data_lock);
+#endif
}
Master_info::~Master_info()