diff options
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index e77d4911b81..1d4a2ac8851 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2935,8 +2935,8 @@ static int mysql_create_routine(THD *thd, LEX *lex) /* Checking the drop permissions if CREATE OR REPLACE is used */ if (lex->create_info.or_replace()) { - if (check_routine_access(thd, ALTER_PROC_ACL, lex->spname->m_db.str, - lex->spname->m_name.str, + if (check_routine_access(thd, ALTER_PROC_ACL, lex->sphead->m_db.str, + lex->sphead->m_name.str, lex->sql_command == SQLCOM_DROP_PROCEDURE, 0)) return true; } |