add comment back and missing file

This commit is contained in:
Arthur Passos 2024-07-11 17:23:37 -03:00
parent ee62318348
commit 300d4ae593
2 changed files with 6 additions and 1 deletions

View File

@ -120,7 +120,7 @@ namespace
{
case AuthenticationType::NO_PASSWORD:
{
return true;
return true; // N.B. even if the password is not empty!
}
case AuthenticationType::PLAINTEXT_PASSWORD:
{

View File

@ -527,6 +527,11 @@ bool ParserCreateUserQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expec
if (!parsed_identified_with)
{
parsed_add_new_method = parseAddIdentifiedWith(pos, expected, auth_data);
if (parsed_add_new_method && !alter)
{
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Create user query is not allowed to have ADD IDENTIFIED, remove the ADD keyword.");
}
}
}