dbms: development [#CONV-2944].

This commit is contained in:
Alexey Milovidov 2012-08-21 15:14:04 +00:00
parent 8359bbbe6b
commit ae75c86be3
2 changed files with 4 additions and 8 deletions

View File

@ -182,6 +182,7 @@ StoragePtr InterpreterCreateQuery::execute()
ASTCreateQuery & attach = dynamic_cast<ASTCreateQuery &>(*attach_ptr);
attach.attach = true;
attach.database.clear();
attach.as_database.clear();
attach.as_table.clear();
attach.if_not_exists = false;

View File

@ -170,13 +170,9 @@ void formatAST(const ASTCreateQuery & ast, std::ostream & s, size_t indent, bo
if (ast.columns)
{
if (one_line)
s << " (";
else
s << "\n(\n";
s << (one_line ? " (" : "\n(");
formatAST(*ast.columns, s, indent + 1, hilite, one_line);
s << ")";
s << (one_line ? ")" : "\n)");
}
if (ast.storage)
@ -354,9 +350,8 @@ void formatAST(const ASTNameTypePair & ast, std::ostream & s, size_t indent, bo
std::string indent_str = one_line ? "" : std::string(4 * indent, ' ');
std::string nl_or_ws = one_line ? " " : "\n";
s << indent_str << backQuoteIfNeed(ast.name) << " ";
s << nl_or_ws << indent_str << backQuoteIfNeed(ast.name) << " ";
formatAST(*ast.type, s, indent, hilite, one_line);
s << nl_or_ws;
}
void formatAST(const ASTAsterisk & ast, std::ostream & s, size_t indent, bool hilite, bool one_line)