summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-03-03 13:27:12 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-03-03 13:27:12 +0200
commitadc91387e3add6d9c850b7c2a44760deaceb3638 (patch)
treec772c6339d2f715a1a50766e30790307e0658f3e /sql/item_func.cc
parentbc28b305e538774eae4152b300cd323e9a724393 (diff)
parent29c776cfd1e560846e394f39d79ae43ff7d70c61 (diff)
downloadmariadb-git-adc91387e3add6d9c850b7c2a44760deaceb3638.tar.gz
Merge 10.0 into 10.1
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 623ff1128f3..ee3fd2f6026 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -3932,12 +3932,7 @@ longlong Item_master_pos_wait::val_int()
else
connection_name= thd->variables.default_master_connection;
- mysql_mutex_lock(&LOCK_active_mi);
- if (master_info_index) // master_info_index is set to NULL on shutdown.
- mi= master_info_index->get_master_info(&connection_name,
- Sql_condition::WARN_LEVEL_WARN);
- mysql_mutex_unlock(&LOCK_active_mi);
- if (!mi)
+ if (!(mi= get_master_info(&connection_name, Sql_condition::WARN_LEVEL_WARN)))
goto err;
if ((event_count = mi->rli.wait_for_pos(thd, log_name, pos, timeout)) == -2)
@@ -3945,6 +3940,7 @@ longlong Item_master_pos_wait::val_int()
null_value = 1;
event_count=0;
}
+ mi->release();
#endif
return event_count;