Fixed regression: cannot CREATE SELECT using HTTP interface [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-03-07 21:53:21 +03:00
parent d73fea5ab0
commit 5fbc1a1ee5

View File

@ -557,7 +557,9 @@ BlockIO InterpreterCreateQuery::createTable(ASTCreateQuery & create)
insert->table = table_name;
insert->select = create.select->clone();
return InterpreterInsertQuery(insert, context.getSessionContext(), context.getSettingsRef().insert_allow_materialized_columns).execute();
return InterpreterInsertQuery(insert,
create.is_temporary ? context.getSessionContext() : context,
context.getSettingsRef().insert_allow_materialized_columns).execute();
}
return {};