mirror of
https://github.com/MariaDB/server.git
synced 2025-09-03 20:43:11 +03:00
Fixes bug #14569. When no db is selected as current and we do create procedure db.sp()...
we changing current db temporarily and restore it when sp is created. however thd->db in this case becomes empty string rather than NULL and so all checks of thd->db == NULL will be false. So if after this we'll issue create procedure sp2()... without specifying db it will succeed and create sp with db=NULL, which causes mysqldto crash on show procedure status statement. This patch fixes the problem.
This commit is contained in:
@@ -4099,7 +4099,7 @@ end_with_restore_list:
|
||||
|
||||
if (!lex->sphead->m_db.str || !lex->sphead->m_db.str[0])
|
||||
{
|
||||
if (!thd->db || thd->db[0] == 0)
|
||||
if (!thd->db)
|
||||
{
|
||||
my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0));
|
||||
delete lex->sphead;
|
||||
|
Reference in New Issue
Block a user