1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-17941 ALTER USER IF EXISTS does not work, although documentation says it should.

Mistake in syntax definition fixed - should be ALTER USER IF EXISTS,
not ALTER IF EXISTS USER.
This commit is contained in:
Alexey Botchkov
2020-02-11 00:19:37 +04:00
parent 235d7c6f54
commit f6663bfbd3
3 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ SET GLOBAL read_only = @start_read_only;
alter user boo;
ERROR HY000: Operation ALTER USER failed for 'boo'
#--warning ER_CANNOT_USER
alter if exists user boo;
alter user if exists boo;
Warnings:
Error 1133 Can't find any matching row in the user table
Note 1396 Operation ALTER USER failed for 'boo'

View File

@ -41,7 +41,7 @@ SET GLOBAL read_only = @start_read_only;
--error ER_CANNOT_USER
alter user boo;
--echo #--warning ER_CANNOT_USER
alter if exists user boo;
alter user if exists boo;
--echo # Test password related altering.
alter user foo identified by 'something';

View File

@ -7294,10 +7294,10 @@ alter:
lex->server_options.reset($3);
} OPTIONS_SYM '(' server_options_list ')' { }
/* ALTER USER foo is allowed for MySQL compatibility. */
| ALTER opt_if_exists USER_SYM clear_privileges grant_list
| ALTER USER_SYM opt_if_exists clear_privileges grant_list
opt_require_clause opt_resource_options
{
Lex->create_info.set($2);
Lex->create_info.set($3);
Lex->sql_command= SQLCOM_ALTER_USER;
}
;