dbms: fixed error: empty queries in process list [#METR-16577].

This commit is contained in:
Alexey Milovidov 2015-05-29 22:08:51 +03:00
parent 98594561d5
commit 3a6d28eb0e

View File

@ -16,7 +16,7 @@ bool ParserSelectQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_p
{
Pos begin = pos;
ASTSelectQuery * select_query = new ASTSelectQuery(StringRange(begin, pos));
ASTSelectQuery * select_query = new ASTSelectQuery;
node = select_query;
ParserWhiteSpaceOrComments ws;
@ -312,6 +312,8 @@ bool ParserSelectQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_p
ws.ignore(pos, end);
}
select_query->range = StringRange(begin, pos);
select_query->children.push_back(select_query->select_expression_list);
if (select_query->database)
select_query->children.push_back(select_query->database);