Remove trailing whitespace in default client_name

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2022-04-08 08:05:04 +03:00
parent 9fa6e6e7df
commit 44bf8ba568
3 changed files with 8 additions and 1 deletions

View File

@ -193,7 +193,10 @@ void ClientInfo::setInitialQuery()
{
query_kind = QueryKind::INITIAL_QUERY;
fillOSUserHostNameAndVersionInfo();
client_name = (DBMS_NAME " ") + client_name;
if (client_name.empty())
client_name = DBMS_NAME;
else
client_name = (DBMS_NAME " ") + client_name;
}

View File

@ -0,0 +1 @@
"ClickHouse"

View File

@ -0,0 +1,3 @@
select 1 settings log_queries=1, log_queries_min_type='QUERY_FINISH' format Null;
system flush logs;
select client_name from system.query_log where current_database = currentDatabase() and query like 'select 1%' format CSV;