dbms: fixed build [#METR-2944].

This commit is contained in:
Alexey Milovidov 2015-04-15 08:20:33 +03:00
parent 3a658e4b26
commit 9a2bb06823

View File

@ -231,7 +231,9 @@ bool parse(DB::ASTPtr & ast, const std::string & query)
{
DB::ParserSelectQuery parser;
std::string message;
ast = DB::tryParseQuery(parser, query.data(), query.data() + query.size(), message, false, "");
auto begin = query.data();
auto end = begin + query.size();
ast = DB::tryParseQuery(parser, begin, end, message, false, "");
return !ast.isNull();
}