Allow attach table with storage_policy + disk for backward compatibility

This commit is contained in:
Кирилл Гарбар 2024-10-18 18:48:39 +03:00
parent cefecafcb7
commit 71b1b76e3b

View File

@ -324,7 +324,7 @@ void MergeTreeSettingsImpl::loadFromQuery(ASTStorage & storage_def, ContextPtr c
else if (name == "storage_policy")
found_storage_policy_setting = true;
if (found_disk_setting && found_storage_policy_setting)
if (!is_attach && found_disk_setting && found_storage_policy_setting)
{
throw Exception(
ErrorCodes::BAD_ARGUMENTS,