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;
This commit is contained in:
unknown 2005-11-11 19:06:18 +03:00
parent db46acd0bc
commit cb38411696

View file

@ -4099,7 +4099,7 @@ end_with_restore_list:
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;