mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Fix checks
This commit is contained in:
parent
bed2688dad
commit
f26da04cdf
@ -30,7 +30,6 @@ namespace DB
|
||||
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int NOT_IMPLEMENTED;
|
||||
extern const int LOGICAL_ERROR;
|
||||
extern const int QUERY_NOT_ALLOWED;
|
||||
extern const int UNKNOWN_TABLE;
|
||||
@ -313,8 +312,8 @@ void DatabaseMaterializedPostgreSQL::attachTable(const String & table_name, cons
|
||||
|
||||
StoragePtr DatabaseMaterializedPostgreSQL::detachTable(const String & table_name)
|
||||
{
|
||||
/// If there is query context then we need to dettach materialized storage.
|
||||
/// If there is no query context then we need to dettach internal storage from atomic database.
|
||||
/// If there is query context then we need to detach materialized storage.
|
||||
/// If there is no query context then we need to detach internal storage from atomic database.
|
||||
if (CurrentThread::isInitialized() && CurrentThread::get().getQueryContext())
|
||||
{
|
||||
auto & table_to_delete = materialized_tables[table_name];
|
||||
|
@ -199,7 +199,7 @@ BlockIO InterpreterAlterQuery::executeToDatabase(const ASTAlterQuery & alter)
|
||||
if (command.type == AlterCommand::MODIFY_DATABASE_SETTING)
|
||||
database->applyNewSettings(command.settings_changes, getContext());
|
||||
else
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unsupported alter command");
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Unsupported alter command");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -197,8 +197,6 @@ public:
|
||||
/// Commands have to be prepared before apply.
|
||||
void apply(StorageInMemoryMetadata & metadata, ContextPtr context) const;
|
||||
|
||||
|
||||
|
||||
/// At least one command modify settings.
|
||||
bool hasSettingsAlterCommand() const;
|
||||
|
||||
|
@ -151,7 +151,7 @@ def test_grant_all_on_table():
|
||||
instance.query("GRANT ALL ON test.table TO A WITH GRANT OPTION")
|
||||
instance.query("GRANT ALL ON test.table TO B", user='A')
|
||||
assert instance.query(
|
||||
"SHOW GRANTS FOR B") == "GRANT SHOW TABLES, SHOW COLUMNS, SHOW DICTIONARIES, SELECT, INSERT, ALTER, CREATE TABLE, CREATE VIEW, CREATE DICTIONARY, DROP TABLE, DROP VIEW, DROP DICTIONARY, TRUNCATE, OPTIMIZE, SYSTEM MERGES, SYSTEM TTL MERGES, SYSTEM FETCHES, SYSTEM MOVES, SYSTEM SENDS, SYSTEM REPLICATION QUEUES, SYSTEM DROP REPLICA, SYSTEM SYNC REPLICA, SYSTEM RESTART REPLICA, SYSTEM RESTORE REPLICA, SYSTEM FLUSH DISTRIBUTED, dictGet ON test.table TO B\n"
|
||||
"SHOW GRANTS FOR B") == "GRANT SHOW TABLES, SHOW COLUMNS, SHOW DICTIONARIES, SELECT, INSERT, ALTER TABLE, ALTER VIEW, CREATE TABLE, CREATE VIEW, CREATE DICTIONARY, DROP TABLE, DROP VIEW, DROP DICTIONARY, TRUNCATE, OPTIMIZE, SYSTEM MERGES, SYSTEM TTL MERGES, SYSTEM FETCHES, SYSTEM MOVES, SYSTEM SENDS, SYSTEM REPLICATION QUEUES, SYSTEM DROP REPLICA, SYSTEM SYNC REPLICA, SYSTEM RESTART REPLICA, SYSTEM RESTORE REPLICA, SYSTEM FLUSH DISTRIBUTED, dictGet ON test.table TO B\n"
|
||||
instance.query("REVOKE ALL ON test.table FROM B", user='A')
|
||||
assert instance.query("SHOW GRANTS FOR B") == ""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user