Skip to content

dbconfigs: fix regression#4871

Merged
rafael merged 1 commit intovitessio:masterfrom
planetscale:ss-dbconfigs
May 23, 2019
Merged

dbconfigs: fix regression#4871
rafael merged 1 commit intovitessio:masterfrom
planetscale:ss-dbconfigs

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented May 23, 2019

@dasl @rafael @eeSeeGee @brirams
Fixes #4870
PR #4814 introduced a regression where the base config would
override charset and flags even if the base config values for
those were not specified.

This change checks for those values before overriding them.

Signed-off-by: Sugu Sougoumarane ssougou@gmail.com

PR vitessio#4814 introduced a regression where the base config would
override charset and flags even if the base config values for
those were not specified.

This change checks for those values before overriding them.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou requested a review from rafael May 23, 2019 01:22
Copy link
Copy Markdown
Member

@rafael rafael left a comment

Choose a reason for hiding this comment

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

Good catch. LGTM

@rafael rafael merged commit b23af2e into vitessio:master May 23, 2019
@sougou sougou deleted the ss-dbconfigs branch May 23, 2019 02:25

uc.param.Charset = baseConfig.Charset
uc.param.Flags = baseConfig.Flags
if baseConfig.Charset != "" {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it seems like the default baseConfig.Charset is utf8: https://github.com/planetscale/vitess/blob/65138f200afdf5d427e415dde9e22be5d5340f7d/go/vt/dbconfigs/dbconfigs.go#L97

Won't this only work if people override the baseConfig.Charset to be the empty string? I'd imagine most people who are using userconfig charsets are not overriding baseConfig.Charset to be the empty string?

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.

utf8mb4 setting no longer honored by "-db-config-*-charset"

3 participants