mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge kpdesk.mysql.com:/home/thek/dev/bug22043/my50-bug22043
into kpdesk.mysql.com:/home/thek/dev/bug22043/my51-bug22043 sql/sp.cc: Auto merged sql/sql_parse.cc: Auto merged mysql-test/r/rpl_sp.result: - Merged; moved comments to end of file mysql-test/t/rpl_sp.test: - Merged; added comments to end of file
This commit is contained in:
@@ -4388,6 +4388,30 @@ end_with_restore_list:
|
||||
DBUG_ASSERT(lex->sphead != 0);
|
||||
DBUG_ASSERT(lex->sphead->m_db.str); /* Must be initialized in the parser */
|
||||
|
||||
/*
|
||||
Verify that the database name is allowed, optionally
|
||||
lowercase it.
|
||||
*/
|
||||
if (check_db_name(lex->sphead->m_db.str))
|
||||
{
|
||||
my_error(ER_WRONG_DB_NAME, MYF(0), lex->sphead->m_db.str);
|
||||
delete lex->sphead;
|
||||
lex->sphead= 0;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/*
|
||||
Check that a database with this name
|
||||
exists.
|
||||
*/
|
||||
if (check_db_dir_existence(lex->sphead->m_db.str))
|
||||
{
|
||||
my_error(ER_BAD_DB_ERROR, MYF(0), lex->sphead->m_db.str);
|
||||
delete lex->sphead;
|
||||
lex->sphead= 0;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (check_access(thd, CREATE_PROC_ACL, lex->sphead->m_db.str, 0, 0, 0,
|
||||
is_schema_db(lex->sphead->m_db.str)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user