Disable Poco::AbstractConfiguration substitutions in query in clickhouse-client

This commit is contained in:
Alexey Milovidov 2019-08-28 18:05:38 +03:00
parent c3d8cce904
commit 10b878b30b
2 changed files with 2 additions and 2 deletions

View File

@ -672,7 +672,7 @@ private:
String text;
if (config().has("query"))
text = config().getString("query");
text = config().getRawString("query"); /// Poco configuration should not process substitutions in form of ${...} inside query.
else
{
/// If 'query' parameter is not set, read a query from stdin.

View File

@ -268,7 +268,7 @@ void LocalServer::attachSystemTables()
void LocalServer::processQueries()
{
String initial_create_query = getInitialCreateTableQuery();
String queries_str = initial_create_query + config().getString("query");
String queries_str = initial_create_query + config().getRawString("query");
std::vector<String> queries;
auto parse_res = splitMultipartQuery(queries_str, queries);