From 3607c33e0123f09337079c974679d35baa1b044b Mon Sep 17 00:00:00 2001 From: Slach Date: Fri, 15 Nov 2024 22:58:08 +0400 Subject: [PATCH] add `log_queries` properly during connection initialization Signed-off-by: Slach --- ChangeLog.md | 1 + pkg/clickhouse/clickhouse.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index c5832a46..55cbe88c 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,7 @@ BUG FIXES - fix possible wrong merging after ATTACH PART for Collapsing and Replacing engines without version, look https://github.com/ClickHouse/ClickHouse/issues/71009 for details +- add `log_queries` properly during connection initialization # v2.6.3 IMPROVEMENTS diff --git a/pkg/clickhouse/clickhouse.go b/pkg/clickhouse/clickhouse.go index 5ad589ce..8ab0cd30 100644 --- a/pkg/clickhouse/clickhouse.go +++ b/pkg/clickhouse/clickhouse.go @@ -106,6 +106,8 @@ func (ch *ClickHouse) Connect() error { } if !ch.Config.LogSQLQueries { opt.Settings["log_queries"] = 0 + } else { + opt.Settings["log_queries"] = 1 } logLevel := zerolog.InfoLevel