mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
Better
This commit is contained in:
parent
7beb843650
commit
33572f9acd
@ -52,8 +52,10 @@ struct AccessRightsElement
|
||||
|
||||
bool sameDatabaseAndTable(const AccessRightsElement & other) const
|
||||
{
|
||||
return (database == other.database) && (any_database == other.any_database) && (table == other.table)
|
||||
&& (any_table == other.any_table);
|
||||
return (database == other.database) && (any_database == other.any_database)
|
||||
&& (table == other.table) && (any_table == other.any_table)
|
||||
&& (named_collection == other.named_collection) && (any_named_collection == other.any_named_collection)
|
||||
&& (isNamedCollectionAccess() == other.isNamedCollectionAccess());
|
||||
}
|
||||
|
||||
bool sameOptions(const AccessRightsElement & other) const
|
||||
|
@ -77,9 +77,7 @@ namespace
|
||||
if (i != elements.size() - 1)
|
||||
{
|
||||
const auto & next_element = elements[i + 1];
|
||||
if ((element.database == next_element.database) && (element.any_database == next_element.any_database)
|
||||
&& (element.table == next_element.table) && (element.any_table == next_element.any_table)
|
||||
&& (element.named_collection == next_element.named_collection))
|
||||
if (element.sameDatabaseAndTable(next_element))
|
||||
next_element_on_same_db_and_table = true;
|
||||
}
|
||||
|
||||
|
@ -136,8 +136,7 @@ namespace
|
||||
if (!ParserKeyword{"ON"}.ignore(pos, expected))
|
||||
return false;
|
||||
|
||||
const bool grant_named_collection_access = named_collection_access && named_collection_access == access_and_columns.size();
|
||||
if (grant_named_collection_access)
|
||||
if (named_collection_access && named_collection_access == access_and_columns.size())
|
||||
{
|
||||
ASTPtr collection;
|
||||
if (ParserToken{TokenType::Asterisk}.ignore(pos, expected))
|
||||
|
Loading…
Reference in New Issue
Block a user