mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-7280 DATABASE: CREATE OR REPLACE
A clean-up: require CREATE+DROP privileges for "CREATE OR REPLACE DATABASE", instead of just CREATE privilege.
This commit is contained in:
@ -4298,7 +4298,9 @@ end_with_restore_list:
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (check_access(thd, CREATE_ACL, lex->name.str, NULL, NULL, 1, 0))
|
||||
if (check_access(thd, lex->create_info.or_replace() ?
|
||||
(CREATE_ACL | DROP_ACL) : CREATE_ACL,
|
||||
lex->name.str, NULL, NULL, 1, 0))
|
||||
break;
|
||||
WSREP_TO_ISOLATION_BEGIN(lex->name.str, NULL, NULL)
|
||||
res= mysql_create_db(thd, lex->name.str, lex->create_info, &create_info);
|
||||
|
Reference in New Issue
Block a user