Commit cb384116 authored by unknown's avatar unknown
Browse files

Fixes bug #14569. In addition to check current db of not being NULL value

it is added a check of not being empty value. When modifying SP with Admin 
application on win32 it does not pass curent database so sp is stored with
db=null which causes a crash later on show procedure status;

parent db46acd0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4099,7 +4099,7 @@ mysql_execute_command(THD *thd)

    if (!lex->sphead->m_db.str || !lex->sphead->m_db.str[0])
    {
      if (! thd->db)
      if (!thd->db || thd->db[0] == 0)
      {
        my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0));
        delete lex->sphead;