From 7ee117853cb17a235b79c451d3e6f42a88b0b67a Mon Sep 17 00:00:00 2001 From: Slach Date: Fri, 13 Sep 2024 14:25:47 +0300 Subject: [PATCH] fix rare corner case, for system.disks query behavior fix https://github.com/Altinity/clickhouse-backup/issues/1007 --- ChangeLog.md | 4 ++++ pkg/clickhouse/clickhouse.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index a5488fc2..5aaf23a4 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,7 @@ +# v2.6.2 +BUG FIXES +- fix rare corner case, for system.disks query behavior fix[1007](https://github.com/Altinity/clickhouse-backup/issues/1007) + # v2.6.1 BUG FIXES - fix unnecessary warnings in `allow_object_disk_streaming: true` behavior during restore diff --git a/pkg/clickhouse/clickhouse.go b/pkg/clickhouse/clickhouse.go index 65020ecb..359b5a1a 100644 --- a/pkg/clickhouse/clickhouse.go +++ b/pkg/clickhouse/clickhouse.go @@ -299,7 +299,7 @@ func (ch *ClickHouse) getDisksFromSystemDisks(ctx context.Context) ([]Disk, erro } var result []Disk query := fmt.Sprintf( - "SELECT d.path, any(d.name) AS name, %s AS type, %s AS free_space, %s AS storage_policies "+ + "SELECT d.path AS path, any(d.name) AS name, %s AS type, %s AS free_space, %s AS storage_policies "+ "FROM system.disks AS d %s GROUP BY d.path", diskTypeSQL, diskFreeSpaceSQL, storagePoliciesSQL, joinStoragePoliciesSQL, )