mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
dbms: fixes in create temporary table [METR-10071]
This commit is contained in:
parent
c12d5231dd
commit
e426667931
@ -237,7 +237,7 @@ StoragePtr InterpreterCreateQuery::execute(bool assume_metadata_exists)
|
||||
|
||||
if (create.is_temporary)
|
||||
{
|
||||
res->is_dropped = true;
|
||||
// res->is_dropped = true;
|
||||
context.getSessionContext().addExternalTable(table_name, res);
|
||||
}
|
||||
else
|
||||
|
@ -248,7 +248,7 @@ void formatAST(const ASTCreateQuery & ast, std::ostream & s, size_t indent, bo
|
||||
if (ast.is_materialized_view)
|
||||
what = "MATERIALIZED VIEW";
|
||||
|
||||
s << (hilite ? hilite_keyword : "") << (ast.attach ? "ATTACH " : "CREATE ") << what << " " << (ast.if_not_exists ? "IF NOT EXISTS " : "") << (hilite ? hilite_none : "")
|
||||
s << (hilite ? hilite_keyword : "") << (ast.attach ? "ATTACH " : "CREATE ") << (ast.is_temporary ? "TEMPORARY " : "") << what << " " << (ast.if_not_exists ? "IF NOT EXISTS " : "") << (hilite ? hilite_none : "")
|
||||
<< (!ast.database.empty() ? backQuoteIfNeed(ast.database) + "." : "") << backQuoteIfNeed(ast.table);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user