Fix inconsistent formatting of GRANT CURRENT GRANTS

This commit is contained in:
Alexey Milovidov 2024-02-26 01:43:37 +01:00
parent bf75d2878b
commit 3f8f641dff
2 changed files with 6 additions and 3 deletions

View File

@ -149,7 +149,8 @@ void ASTGrantQuery::formatImpl(const FormatSettings & settings, FormatState &, F
}
else if (current_grants)
settings.ostr << (settings.hilite ? hilite_keyword : "") << " CURRENT GRANTS" << (settings.hilite ? hilite_none : "");
else
if (!access_rights_elements.empty())
formatElementsWithoutOptions(access_rights_elements, settings);
settings.ostr << (settings.hilite ? IAST::hilite_keyword : "") << (is_revoke ? " FROM " : " TO ")

View File

@ -200,8 +200,10 @@ namespace
if (!ParserKeyword{"ON"}.ignore(pos, expected))
return false;
String database_name, table_name;
bool any_database = false, any_table = false;
String database_name;
String table_name;
bool any_database = false;
bool any_table = false;
if (!parseDatabaseAndTableNameOrAsterisks(pos, expected, database_name, any_database, table_name, any_table))
return false;