mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Fix stupid bug with settings alter
This commit is contained in:
parent
6fb48c5e9a
commit
fc18f82189
@ -628,6 +628,11 @@ void AlterCommands::validate(const StorageInMemoryMetadata & metadata, const Con
|
||||
ErrorCodes::NOT_FOUND_COLUMN_IN_BLOCK};
|
||||
}
|
||||
}
|
||||
else if (command.type == AlterCommand::MODIFY_SETTING)
|
||||
{
|
||||
if (metadata.settings_ast == nullptr)
|
||||
throw Exception{"Cannot alter settings, because table engine doesn't support settings changes", ErrorCodes::BAD_ARGUMENTS};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ CREATE TABLE log_for_alter (
|
||||
Data String
|
||||
) ENGINE = Log();
|
||||
|
||||
ALTER TABLE log_for_alter MODIFY SETTING aaa=123; -- { serverError 48 }
|
||||
ALTER TABLE log_for_alter MODIFY SETTING aaa=123; -- { serverError 36 }
|
||||
|
||||
DROP TABLE IF EXISTS log_for_alter;
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,15 @@
|
||||
DROP TABLE IF EXISTS old_format_mt;
|
||||
|
||||
CREATE TABLE old_format_mt (
|
||||
event_date Date,
|
||||
key UInt64,
|
||||
value1 UInt64,
|
||||
value2 String
|
||||
)
|
||||
ENGINE = MergeTree(event_date, (key, value1), 8192);
|
||||
|
||||
ALTER TABLE old_format_mt MODIFY SETTING enable_mixed_granularity_parts = 1; --{serverError 36}
|
||||
|
||||
SELECT 1;
|
||||
|
||||
DROP TABLE IF EXISTS old_format_mt;
|
Loading…
Reference in New Issue
Block a user