Skip to content

Commit 2ffc92c

Browse files
authored
Merge pull request #1130 from yudhiesh/fix/incorrect-query-for-access-management-path
Fix RBAC Backup Query: Change Type Filter to support "local directory" and "local_directory"
2 parents 8774f64 + b3b287e commit 2ffc92c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/clickhouse/clickhouse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ func (ch *ClickHouse) GetAccessManagementPath(ctx context.Context, disks []Disk)
11391139
rows := make([]struct {
11401140
AccessPath string `ch:"access_path"`
11411141
}, 0)
1142-
if err := ch.SelectContext(ctx, &rows, "SELECT JSONExtractString(params,'path') AS access_path FROM system.user_directories WHERE type='local directory'"); err != nil || len(rows) == 0 {
1142+
if err := ch.SelectContext(ctx, &rows, "SELECT JSONExtractString(params,'path') AS access_path FROM system.user_directories WHERE type in ('local_directory','local directory')"); err != nil || len(rows) == 0 {
11431143
configFile, doc, err := ch.ParseXML(ctx, "config.xml")
11441144
if err != nil {
11451145
log.Warn().Msgf("can't parse config.xml from %s, error: %v", configFile, err)

0 commit comments

Comments
 (0)