summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 9eff1655711..4605d49f3ab 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -981,6 +981,7 @@ sp_cache_functions(THD *thd, LEX *lex)
thd->lex= newlex;
newlex->proc_table= oldlex->proc_table; // hint if mysql.oper is opened
+ newlex->current_select= NULL;
name.m_name.str= strchr(name.m_qname.str, '.');
name.m_db.length= name.m_name.str - name.m_qname.str;
name.m_db.str= strmake_root(thd->mem_root,