• SergeyV@selena.'s avatar
    Fixes bug #14569. When no db is selected as current and we do create procedure db.sp()... · dbb29d11
    SergeyV@selena. authored
    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.
    dbb29d11
sql_parse.cc 220 KB