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

clarify collations are also supported for db_charset #16423

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/flags/endtoend/mysqlctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Flags:
--db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate
--db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable
--db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s)
--db_charset string Character set used for this tablet. (default "utf8mb4")
--db_charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we probably want to drop the Make sure bit since for anyone running MySQL 8 and later (which is the only supported version), the default is fine and doesn't need configuring.

Copy link
Member

Choose a reason for hiding this comment

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

What are you proposing? Drop the entire second sentence? Can you post that as a suggestion so that it is clearer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dbussink FWIW, I kept the wording vague not mentioning $oldUnsupportedVersion. Just for the case that oracle would add a newer version of the Unicode character set in a future major upgrade… In that case this would become relevant again… but if the consensus is to remove the sentence, I can do that…

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd say we can drop the entire second sentence? Maybe something like:

Character set or collation name used by this tablet for the connection to MySQL

Just for the case that oracle would add a newer version of the Unicode character set in a future major upgrade…

I doubt this would happen, but they do have 4 chances to do this 😉. See:

SELECT id, COLLATION_NAME FROM INFORMATION_SCHEMA.COLLATIONS order by id;
...
| 249 | gb18030_bin                 |
| 250 | gb18030_unicode_520_ci      |
| 255 | utf8mb4_0900_ai_ci          |
...

Giving this is a one byte field in the MySQL handshake protocol, only 251, 252, 253 & 254 are not used yet. You can't use any of the names with an Id > 255 here anyway because of that limitation.

But I also think that if that time comes, we can further clarify it with the situation that is then current?

Copy link
Member

Choose a reason for hiding this comment

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

I say let's merge this for now and if and when things change we can revisit.

--db_conn_query_info enable parsing and processing of QUERY_OK info fields
--db_connect_timeout_ms int connection timeout to mysqld in milliseconds (0 for no timeout)
--db_dba_password string db dba password
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/mysqlctld.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Flags:
--db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate
--db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable
--db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s)
--db_charset string Character set used for this tablet. (default "utf8mb4")
--db_charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4")
--db_conn_query_info enable parsing and processing of QUERY_OK info fields
--db_connect_timeout_ms int connection timeout to mysqld in milliseconds (0 for no timeout)
--db_dba_password string db dba password
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vtbackup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Flags:
--db_appdebug_password string db appdebug password
--db_appdebug_use_ssl Set this flag to false to make the appdebug connection to not use ssl (default true)
--db_appdebug_user string db appdebug user userKey (default "vt_appdebug")
--db_charset string Character set used for this tablet. (default "utf8mb4")
--db_charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4")
--db_conn_query_info enable parsing and processing of QUERY_OK info fields
--db_connect_timeout_ms int connection timeout to mysqld in milliseconds (0 for no timeout)
--db_dba_password string db dba password
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vtcombo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Flags:
--db_appdebug_password string db appdebug password
--db_appdebug_use_ssl Set this flag to false to make the appdebug connection to not use ssl (default true)
--db_appdebug_user string db appdebug user userKey (default "vt_appdebug")
--db_charset string Character set used for this tablet. (default "utf8mb4")
--db_charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4")
--db_conn_query_info enable parsing and processing of QUERY_OK info fields
--db_connect_timeout_ms int connection timeout to mysqld in milliseconds (0 for no timeout)
--db_dba_password string db dba password
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vttablet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Flags:
--db_appdebug_password string db appdebug password
--db_appdebug_use_ssl Set this flag to false to make the appdebug connection to not use ssl (default true)
--db_appdebug_user string db appdebug user userKey (default "vt_appdebug")
--db_charset string Character set used for this tablet. (default "utf8mb4")
--db_charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4")
--db_conn_query_info enable parsing and processing of QUERY_OK info fields
--db_connect_timeout_ms int connection timeout to mysqld in milliseconds (0 for no timeout)
--db_dba_password string db dba password
Expand Down
2 changes: 1 addition & 1 deletion go/vt/dbconfigs/dbconfigs.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func registerBaseFlags(fs *pflag.FlagSet) {
fs.StringVar(&GlobalDBConfigs.Socket, "db_socket", "", "The unix socket to connect on. If this is specified, host and port will not be used.")
fs.StringVar(&GlobalDBConfigs.Host, "db_host", "", "The host name for the tcp connection.")
fs.IntVar(&GlobalDBConfigs.Port, "db_port", 0, "tcp port")
fs.StringVar(&GlobalDBConfigs.Charset, "db_charset", "utf8mb4", "Character set used for this tablet.")
fs.StringVar(&GlobalDBConfigs.Charset, "db_charset", "utf8mb4", "Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment.")
fs.Uint64Var(&GlobalDBConfigs.Flags, "db_flags", 0, "Flag values as defined by MySQL.")
fs.StringVar(&GlobalDBConfigs.Flavor, "db_flavor", "", "Flavor overrid. Valid value is FilePos.")
fs.Var(&GlobalDBConfigs.SslMode, "db_ssl_mode", "SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity.")
Expand Down
Loading