Commit f94cb2b9 authored by unknown's avatar unknown

A fix (Bug #6843: Wrong function name crashes MySQL if mysql.proc table is missi

            


sql/sp.cc:
  A fix (Bug #6843: Wrong function name crashes MySQL if mysql.proc table is missi
  We test current_select (in case of error) in the my_message_sql().
parent 9a3de944
...@@ -981,6 +981,7 @@ sp_cache_functions(THD *thd, LEX *lex) ...@@ -981,6 +981,7 @@ sp_cache_functions(THD *thd, LEX *lex)
thd->lex= newlex; thd->lex= newlex;
newlex->proc_table= oldlex->proc_table; // hint if mysql.oper is opened 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_name.str= strchr(name.m_qname.str, '.');
name.m_db.length= name.m_name.str - 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, name.m_db.str= strmake_root(thd->mem_root,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment