mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
A little bit better.
This commit is contained in:
parent
cdc529fa2a
commit
ff09076524
@ -1200,9 +1200,9 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create,
|
||||
if (!create.attach && getContext()->getSettingsRef().database_replicated_allow_only_replicated_engine)
|
||||
{
|
||||
bool is_replicated_storage = typeid_cast<const StorageReplicatedMergeTree *>(res.get()) != nullptr;
|
||||
if (!is_replicated_storage && database && database->getEngineName() != "Replicated")
|
||||
if (!is_replicated_storage && res->storesDataOnDisk() && database && database->getEngineName() != "Replicated")
|
||||
throw Exception(ErrorCodes::UNKNOWN_STORAGE,
|
||||
"Only Replicated tables are allowed in database engine is Replicated");
|
||||
"Only table with Replicated engine or tables which does not store data on disk are allowed in Replicated database");
|
||||
}
|
||||
|
||||
if (from_path && !res->storesDataOnDisk())
|
||||
|
Loading…
Reference in New Issue
Block a user