Skip to content

Commit

Permalink
change test to reproduce #938, fix #938
Browse files Browse the repository at this point in the history
  • Loading branch information
Slach committed Jun 26, 2024
1 parent 3f984e9 commit efa86fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ func (ch *ClickHouse) prepareGetTablesSQL(tablePattern string, skipDatabases, sk

allTablesSQL += " FROM system.tables WHERE is_temporary = 0"
if tablePattern != "" {
replacer := strings.NewReplacer(".", "\\.", "$", "\\.", ",", "$|^", "*", ".*", "?", ".", " ", "", "`", "", `"`, "", "-", "\\-")
replacer := strings.NewReplacer(".", "\\.", "$", ".", ",", "$|^", "*", ".*", "?", ".", " ", "", "`", "", `"`, "", "-", "\\-")
allTablesSQL += fmt.Sprintf(" AND match(concat(database,'.',name),'^%s$') ", replacer.Replace(tablePattern))
}
if len(skipDatabases) > 0 {
Expand Down

0 comments on commit efa86fa

Please sign in to comment.