mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 17:32:32 +00:00
Disallow creation of temporary tables with ON CLUSTER and with Repliacted table engines
This commit is contained in:
parent
c09d8e744f
commit
df4a9f111c
@ -924,6 +924,13 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const
|
||||
if (create.storage && !create.storage->engine)
|
||||
throw Exception(ErrorCodes::INCORRECT_QUERY, "Invalid storage definition for temporary table: must be either ENGINE = Memory or empty");
|
||||
*/
|
||||
|
||||
if (!create.cluster.empty())
|
||||
throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables cannot be created with ON CLUSTER clause");
|
||||
|
||||
if (create.storage && create.storage->engine && create.storage->engine->name.starts_with("Replicated"))
|
||||
throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables cannot be created with Replicated table engines");
|
||||
|
||||
if (!create.storage)
|
||||
{
|
||||
auto engine_ast = std::make_shared<ASTFunction>();
|
||||
|
Loading…
Reference in New Issue
Block a user