summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-08-25 12:40:09 +0200
committerSergei Golubchik <serg@mariadb.org>2016-08-25 12:40:09 +0200
commit6b1863b8304662189a3b9a4aef1e1bebef035b86 (patch)
tree48ba2cbdda863b644108e93ace3668333ae0d193 /sql/item_func.cc
parentea91bb6801b1b619d64fa137ea351eca9de683ec (diff)
parent5bbe929d706e26cb3f9b291da6009526a17b1545 (diff)
downloadmariadb-git-6b1863b8304662189a3b9a4aef1e1bebef035b86.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 47ad756144a..a1c5835d525 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -3916,7 +3916,7 @@ longlong Item_master_pos_wait::val_int()
longlong timeout = (arg_count>=3) ? args[2]->val_int() : 0 ;
String connection_name_buff;
LEX_STRING connection_name;
- Master_info *mi;
+ Master_info *mi= NULL;
if (arg_count >= 4)
{
String *con;
@@ -3936,8 +3936,9 @@ longlong Item_master_pos_wait::val_int()
connection_name= thd->variables.default_master_connection;
mysql_mutex_lock(&LOCK_active_mi);
- mi= master_info_index->get_master_info(&connection_name,
- Sql_condition::WARN_LEVEL_WARN);
+ 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)
goto err;