Skip to content

fix: preserve original case for DSN query parameter values#1802

Open
tank-500m wants to merge 3 commits intoClickHouse:mainfrom
tank-500m:fix/dsn-parser-preserve-setting-value-case
Open

fix: preserve original case for DSN query parameter values#1802
tank-500m wants to merge 3 commits intoClickHouse:mainfrom
tank-500m:fix/dsn-parser-preserve-setting-value-case

Conversation

@tank-500m
Copy link
Copy Markdown

Summary

Fix #1800

strings.ToLower was applied to query parameter values for true/false boolean comparison, but the lowered value leaked into the default branch, causing settings like log_comment to be unintentionally lowercased.

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

Copy link
Copy Markdown
Member

@SpencerTorres SpencerTorres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I wonder if this has any breaking changes

@tank-500m
Copy link
Copy Markdown
Author

Thanks! @SpencerTorres

No breaking changes as far as I can tell. The boolean path (true/false) still goes through strings.ToLower so that's unchanged, and numeric values aren't affected by casing. The only difference is that string settings now keep their original case — which is what users would expect. Anyone affected would have been relying on the bug itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DSN parser lowercases setting values unexpectedly

3 participants