This commit is contained in:
Alexander Tokmakov 2020-09-04 19:31:37 +03:00
parent ed5f827708
commit 98963deed3

View File

@ -587,8 +587,7 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const
if (create.storage || create.is_view || create.is_materialized_view || create.is_live_view || create.is_dictionary)
{
assert(create.storage->engine);
if (create.temporary && create.storage->engine->name != "Memory")
if (create.temporary && create.storage && create.storage->engine && create.storage->engine->name != "Memory")
throw Exception(
"Temporary tables can only be created with ENGINE = Memory, not " + create.storage->engine->name,
ErrorCodes::INCORRECT_QUERY);