Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-db_charset doesn't behave the same way as deprecated -db-config-*-charset settings #4654

Closed
tomkrouper opened this issue Feb 21, 2019 · 1 comment

Comments

@tomkrouper
Copy link
Collaborator

Overview of the Issue

We use emoji in our application and because of that we need to use utf8mb4. We still have the old-style -db-config-<user>-charset settings which we changed to utf8mb4 and everything worked as expected. While working with this, I saw the deprecation notice, so I attempted to just use -db_charset utf8mb4. This did not work. @deepthi was able to point me to func Init(defaultSocketFile string) (*DBConfigs, error) which shows that -db_charset requires -db_host. Unfortunately, when I set -db_host, my.cnf gets ignored which causes other issues.

Expected behavior would be to have setting -db_charset be the same behavior as setting the charset on a user level.

Reproduction Steps

  1. Spin up docker vitess/base.

  2. Start vttablet with -db-config-dba-charset utf8mb4 -db-config-app-charset utf8mb4 -db-config-appdebug-charset utf8mb4 -db-config-allprivs-charset utf8mb4 -db-config-repl-charset utf8mb4 -db-config-filtered-charset utf8mb4 options

  3. Insert data with emoji.

  4. SELECT data, see emoji in output.

  5. Spin up docker vitess/base.

  6. Start vttablet with -db_charset utf8mb4`

  7. Insert data with emoji.

  8. SELECT data, see ? where emoji output should be.

Binary version

Example:

vitess@4792fbfd1caa:/vt/src/vitess.io/vitess$ vttablet --version
ERROR: logging before flag.Parse: E0221 22:23:34.724761    2113 syslogger.go:122] can't connect to syslog
Version: 613bb78e4 (Git branch 'master') built on Tue Feb 12 04:35:14 UTC 2019 by root@40b3289860a2 using go1.11.2 linux/amd64

Operating system and Environment details

docker vitess/base

dasl- added a commit to dasl-/vitess that referenced this issue Apr 16, 2019
… running in managed or non-managed mode.

Addresses vitessio#4654

Signed-off-by: dleibovic <dleibovic@etsy.com>
@deepthi
Copy link
Member

deepthi commented May 16, 2019

Fixed by #4814

@deepthi deepthi closed this as completed May 16, 2019
frouioui pushed a commit to planetscale/vitess that referenced this issue Mar 26, 2024
…y flag `--unsafe-allow-foreign-keys` implies setting `FOREIGN_KEY_CHECKS=0` (vitessio#4654)

* backport of 4653

* resolved conflict

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>

---------

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
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

No branches or pull requests

2 participants