Fixing build.

This commit is contained in:
Nikolai Kochetov 2020-12-16 20:11:32 +03:00
parent cd7827f70c
commit d96ca3fb8d
5 changed files with 5 additions and 5 deletions

View File

@ -115,7 +115,7 @@ void ODBCColumnsInfoHandler::handleRequest(Poco::Net::HTTPServerRequest & reques
std::string name = schema_name.empty() ? backQuoteIfNeed(table_name) : backQuoteIfNeed(schema_name) + "." + backQuoteIfNeed(table_name);
WriteBufferFromOwnString buf;
std::string input = "SELECT * FROM " + name + " WHERE 1 = 0";
ParserQueryWithOutput parser;
ParserQueryWithOutput parser(input.data() + input.size());
ASTPtr select = parseQuery(parser, input.data(), input.data() + input.size(), "", context_settings.max_query_size, context_settings.max_parser_depth);
IAST::FormatSettings settings(buf, true);

View File

@ -22,7 +22,7 @@ try
" INTO OUTFILE 'test.out'"
" FORMAT TabSeparated";
ParserQueryWithOutput parser;
ParserQueryWithOutput parser(input.data() + input.size());
ASTPtr ast = parseQuery(parser, input.data(), input.data() + input.size(), "", 0, 0);
std::cout << "Success." << std::endl;

View File

@ -11,7 +11,7 @@ try
{
std::string input = std::string(reinterpret_cast<const char*>(data), size);
DB::ParserQueryWithOutput parser;
DB::ParserQueryWithOutput parser(input.data() + input.size());
DB::ASTPtr ast = parseQuery(parser, input.data(), input.data() + input.size(), "", 0, 0);
DB::formatAST(*ast, std::cerr);

View File

@ -1 +1 @@
explain ast alter table t1 delete where date = today();
explain ast alter table t1 delete where date = today()

View File

@ -1255,10 +1255,10 @@ void parseSelectQuery(DB::ASTPtr ast, TableList & all_tables)
TableList getTablesFromSelect(std::vector<std::string> queries)
{
DB::ParserQueryWithOutput parser;
TableList result;
for (std::string & query : queries)
{
DB::ParserQueryWithOutput parser(query.data() + query.size());
DB::ASTPtr ast = parseQuery(parser, query.data(), query.data() + query.size(), "", 0, 0);
for (auto & select : getSelect(ast))
{