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:
@ -43,7 +43,7 @@ SET GLOBAL read_only = @start_read_only;
|
|||||||
alter user boo;
|
alter user boo;
|
||||||
ERROR HY000: Operation ALTER USER failed for 'boo'
|
ERROR HY000: Operation ALTER USER failed for 'boo'
|
||||||
#--warning ER_CANNOT_USER
|
#--warning ER_CANNOT_USER
|
||||||
alter if exists user boo;
|
alter user if exists boo;
|
||||||
Warnings:
|
Warnings:
|
||||||
Error 1133 Can't find any matching row in the user table
|
Error 1133 Can't find any matching row in the user table
|
||||||
Note 1396 Operation ALTER USER failed for 'boo'
|
Note 1396 Operation ALTER USER failed for 'boo'
|
||||||
|
@ -41,7 +41,7 @@ SET GLOBAL read_only = @start_read_only;
|
|||||||
--error ER_CANNOT_USER
|
--error ER_CANNOT_USER
|
||||||
alter user boo;
|
alter user boo;
|
||||||
--echo #--warning ER_CANNOT_USER
|
--echo #--warning ER_CANNOT_USER
|
||||||
alter if exists user boo;
|
alter user if exists boo;
|
||||||
|
|
||||||
--echo # Test password related altering.
|
--echo # Test password related altering.
|
||||||
alter user foo identified by 'something';
|
alter user foo identified by 'something';
|
||||||
|
@ -7294,10 +7294,10 @@ alter:
|
|||||||
lex->server_options.reset($3);
|
lex->server_options.reset($3);
|
||||||
} OPTIONS_SYM '(' server_options_list ')' { }
|
} OPTIONS_SYM '(' server_options_list ')' { }
|
||||||
/* ALTER USER foo is allowed for MySQL compatibility. */
|
/* 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
|
opt_require_clause opt_resource_options
|
||||||
{
|
{
|
||||||
Lex->create_info.set($2);
|
Lex->create_info.set($3);
|
||||||
Lex->sql_command= SQLCOM_ALTER_USER;
|
Lex->sql_command= SQLCOM_ALTER_USER;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
Reference in New Issue
Block a user