mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge 4765fcac38
into 44b4bd38b9
This commit is contained in:
commit
43722a0ba6
@ -549,6 +549,8 @@ bool ParserCreateUserQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expec
|
||||
auto names = typeid_cast<std::shared_ptr<ASTUserNamesWithHost>>(names_ast);
|
||||
auto names_ref = names->names;
|
||||
|
||||
auto pos_after_parsing_names = pos;
|
||||
|
||||
std::optional<String> new_name;
|
||||
std::optional<AllowedClientHosts> hosts;
|
||||
std::optional<AllowedClientHosts> add_hosts;
|
||||
@ -674,6 +676,13 @@ bool ParserCreateUserQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expec
|
||||
else if (alter)
|
||||
names->concatParts();
|
||||
|
||||
bool alter_query_with_no_changes = alter && pos_after_parsing_names == pos;
|
||||
|
||||
if (alter_query_with_no_changes)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
auto query = std::make_shared<ASTCreateUserQuery>();
|
||||
node = query;
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
-- Tags: no-parallel
|
||||
|
||||
create user u_03254_alter_user;
|
||||
alter user u_03254_alter_user; -- { clientError SYNTAX_ERROR }
|
||||
drop user u_03254_alter_user;
|
Loading…
Reference in New Issue
Block a user