dbms: fixes in create temporary table [METR-10071]

This commit is contained in:
Sergey Fedorov 2014-04-01 17:41:03 +04:00
parent c12d5231dd
commit e426667931
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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);
}