1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-16987 - ALTER DATABASE possible in read-only mode

Forbid ALTER DATABASE under read_only.
This commit is contained in:
Sergey Vojtovich
2018-12-12 19:58:20 +04:00
parent 32b7d456d5
commit 15eaeace39
3 changed files with 25 additions and 0 deletions

View File

@ -831,6 +831,7 @@ static bool deny_updates_if_read_only_option(THD *thd, TABLE_LIST *all_tables)
DBUG_RETURN(FALSE);
if (lex->sql_command == SQLCOM_CREATE_DB ||
lex->sql_command == SQLCOM_ALTER_DB ||
lex->sql_command == SQLCOM_DROP_DB)
DBUG_RETURN(TRUE);