Skip to content

Commit

Permalink
Update bundled MySQL version to 8.0.40
Browse files Browse the repository at this point in the history
We haven't updated the bundled MySQL version in a while and it also
blocks us from upgrading our base Debian version for the containers we
build as well.

So update to the latest 8.0.x version here. It's also at least version
8.0.35, which means that updates after this one are going to be much
easier as upgrades / downgrades between different patch versions are
possible for 8.0.35 and later.

Signed-off-by: Dirkjan Bussink <[email protected]>
  • Loading branch information
dbussink committed Jan 16, 2025
1 parent 5468f5d commit 220dcfd
Show file tree
Hide file tree
Showing 20 changed files with 42 additions and 19 deletions.
23 changes: 23 additions & 0 deletions changelog/22.0/22.0.0/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- **[Support for More Efficient JSON Replication](#efficient-json-replication)**
- **[Support for LAST_INSERT_ID(x)](#last-insert-id)**
- **[Support for Maximum Idle Connections in the Pool](#max-idle-connections)**
- **[Update default MySQL version to 8.0.40](#mysql-8-0-40)**
- **[Minor Changes](#minor-changes)**
- **[VTTablet Flags](#flags-vttablet)**
- **[Topology read concurrency behaviour changes](#topo-read-concurrency-changes)**
Expand Down Expand Up @@ -100,6 +101,28 @@ You can control idle connection retention for the query server’s query pool, s

This feature ensures that, during traffic spikes, idle connections are available for faster responses, while minimizing overhead in low-traffic periods by limiting the number of idle connections retained. It helps strike a balance between performance, efficiency, and cost.

### <a id="mysql-8-0-40"/>Update default MySQL version to 8.0.40</a>

The default major MySQL version used by our `vitess/lite:latest` image is going from `8.0.30` to `8.0.40`.
This change was brought by [Pull Request #17552](https://github.com/vitessio/vitess/pull/17552).

VTGate also advertises MySQL version `8.0.40` by default instead of `8.0.30` if no explicit version is set. The users can set the `mysql_server_version` flag to advertise the correct version.

#### <a id="upgrading-to-this-release-with-vitess-operator"/>⚠️Upgrading to this release with vitess-operator

If you are using the `vitess-operator` and want to remain on MySQL 5.7, **you are required** to use the `vitess/lite:v16.0.0-mysql57` Docker Image, otherwise the `vitess/lite:v16.0.0` image will be on MySQL 80.

f you are using the `vitess-operator`, considering that we are bumping the patch version of MySQL 80 from `8.0.30` to `8.0.40`, you will have to manually upgrade:

1. Add `innodb_fast_shutdown=0` to your extra cnf in your YAML file.
2. Apply this file.
3. Wait for all the pods to be healthy.
4. Then change your YAML file to use the new Docker Images (`vitess/lite:v16.0.0`, defaults to mysql80).
5. Remove `innodb_fast_shutdown=0` from your extra cnf in your YAML file.
6. Apply this file.

This is the last time this will be needed in the `8.0.x` series, as starting with MySQL `8.0.35` it is possible to upgrade and downgrade between `8.0.x` versions without needing to run `innodb_fast_shutdown=0`.

## <a id="minor-changes"/>Minor Changes</a>

#### <a id="flags-vttablet"/>VTTablet Flags</a>
Expand Down
2 changes: 1 addition & 1 deletion docker/utils/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ mysql57)
;;
mysql80)
if [ -z "$VERSION" ]; then
VERSION=8.0.30
VERSION=8.0.40
fi
do_fetch https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-common_${VERSION}-1debian11_amd64.deb /tmp/mysql-common_${VERSION}-1debian11_amd64.deb
do_fetch https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/libmysqlclient21_${VERSION}-1debian11_amd64.deb /tmp/libmysqlclient21_${VERSION}-1debian11_amd64.deb
Expand Down
2 changes: 1 addition & 1 deletion docker/vttestserver/Dockerfile.mysql80
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ USER vitess
COPY docker/vttestserver/setup_vschema_folder.sh /vt/setup_vschema_folder.sh
COPY docker/vttestserver/run.sh /vt/run.sh

CMD /vt/run.sh "8.0.30-Vitess"
CMD /vt/run.sh "8.0.40-Vitess"
2 changes: 1 addition & 1 deletion go/flags/endtoend/mysqlctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Flags:
--logtostderr log to standard error instead of files
--max-stack-size int configure the maximum stack size in bytes (default 67108864)
--mysql_port int MySQL port. (default 3306)
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--mysql_socket string Path to the mysqld socket file.
--mysqlctl_client_protocol string the protocol to use to talk to the mysqlctl server (default "grpc")
--mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init
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 @@ -99,7 +99,7 @@ Flags:
--logtostderr log to standard error instead of files
--max-stack-size int configure the maximum stack size in bytes (default 67108864)
--mysql_port int MySQL port (default 3306)
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--mysql_socket string Path to the mysqld socket file
--mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init
--mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions)
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 @@ -184,7 +184,7 @@ Flags:
--mysql-shell-speedup-restore speed up restore by disabling redo logging and double write buffer during the restore process
--mysql-shutdown-timeout duration how long to wait for mysqld shutdown (default 5m0s)
--mysql_port int mysql port (default 3306)
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--mysql_socket string path to the mysql socket
--mysql_timeout duration how long to wait for mysqld startup (default 5m0s)
--opentsdb_uri string URI of opentsdb /api/put method
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vtbench.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Flags:
--log_err_stacks log stack traces for errors
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
--logtostderr log to standard error instead of files
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--port int VTGate port
--pprof strings enable profiling
--pprof-http enable pprof http endpoints
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vtclient.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Flags:
--logtostderr log to standard error instead of files
--max_sequence_id int max sequence ID.
--min_sequence_id int min sequence ID to generate. When max_sequence_id > min_sequence_id, for each query, a number is generated in [min_sequence_id, max_sequence_id) and attached to the end of the bind variables.
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--parallel int DMLs only: Number of threads executing the same query in parallel. Useful for simple load testing. (default 1)
--pprof strings enable profiling
--pprof-http enable pprof http endpoints
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 @@ -242,7 +242,7 @@ Flags:
--mysql_server_ssl_key string Path to ssl key for mysql server plugin SSL
--mysql_server_ssl_server_ca string path to server CA in PEM format, which will be combine with server cert, return full certificate chain to clients
--mysql_server_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3.
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--mysql_server_write_timeout duration connection write timeout
--mysql_slow_connect_warn_threshold duration Warn if it takes more than the given threshold for a mysql connection to establish
--mysql_tcp_version string Select tcp, tcp4, or tcp6 to control the socket type. (default "tcp")
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vtctld.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Flags:
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
--logtostderr log to standard error instead of files
--max-stack-size int configure the maximum stack size in bytes (default 67108864)
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--onclose_timeout duration wait no more than this for OnClose handlers before stopping (default 10s)
--onterm_timeout duration wait no more than this for OnTermSync handlers before stopping (default 10s)
--opentsdb_uri string URI of opentsdb /api/put method
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vtctldclient.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Flags:
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
--logbuflevel int Buffer log messages logged at this level or lower (-1 means don't buffer; 0 means buffer INFO only; ...). Has limited applicability on non-prod platforms.
--logtostderr log to standard error instead of files
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
--server string server to use for the connection (required)
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vtexplain.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Flags:
--log_err_stacks log stack traces for errors
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
--logtostderr log to standard error instead of files
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--normalize Whether to enable vtgate normalization
--output-mode string Output in human-friendly text or json (default "text")
--planner-version string Sets the default planner to use. Valid values are: Gen4, Gen4Greedy, Gen4Left2Right
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vtgate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Flags:
--mysql_server_ssl_key string Path to ssl key for mysql server plugin SSL
--mysql_server_ssl_server_ca string path to server CA in PEM format, which will be combine with server cert, return full certificate chain to clients
--mysql_server_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3.
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--mysql_server_write_timeout duration connection write timeout
--mysql_slow_connect_warn_threshold duration Warn if it takes more than the given threshold for a mysql connection to establish
--mysql_tcp_version string Select tcp, tcp4, or tcp6 to control the socket type. (default "tcp")
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vtgateclienttest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Flags:
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
--logtostderr log to standard error instead of files
--max-stack-size int configure the maximum stack size in bytes (default 67108864)
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--onclose_timeout duration wait no more than this for OnClose handlers before stopping (default 10s)
--onterm_timeout duration wait no more than this for OnTermSync handlers before stopping (default 10s)
--pid_file string If set, the process will write its pid to the named file, and delete it on graceful shutdown.
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 @@ -244,7 +244,7 @@ Flags:
--mysql-shell-should-drain decide if we should drain while taking a backup or continue to serving traffic
--mysql-shell-speedup-restore speed up restore by disabling redo logging and double write buffer during the restore process
--mysql-shutdown-timeout duration timeout to use when MySQL is being shut down. (default 5m0s)
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init
--mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions)
--onclose_timeout duration wait no more than this for OnClose handlers before stopping (default 10s)
Expand Down
2 changes: 1 addition & 1 deletion go/flags/endtoend/vttestserver.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Flags:
--mysql-shell-speedup-restore speed up restore by disabling redo logging and double write buffer during the restore process
--mysql_bind_host string which host to bind vtgate mysql listener to (default "localhost")
--mysql_only If this flag is set only mysql is initialized. The rest of the vitess components are not started. Also, the output specifies the mysql unix socket instead of the vtgate port.
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
--mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init
--mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions)
--no_scatter when set to true, the planner will fail instead of producing a plan that includes scatter queries
Expand Down
2 changes: 1 addition & 1 deletion go/mysql/collations/integration/collations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var collationEnv *collations.Environment

func init() {
// We require MySQL 8.0 collations for the comparisons in the tests
collationEnv = collations.NewEnvironment("8.0.30")
collationEnv = collations.NewEnvironment("8.0.40")
}

func getSQLQueries(t *testing.T, testfile string) []string {
Expand Down
2 changes: 1 addition & 1 deletion go/mysql/config/config.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package config

const DefaultSQLMode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
const DefaultMySQLVersion = "8.0.30"
const DefaultMySQLVersion = "8.0.40"
const LegacyMySQLVersion = "5.7.31"
2 changes: 1 addition & 1 deletion go/vt/servenv/buildinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestVersionString(t *testing.T) {

assert.Equal(t, "Version: v1.2.3-SNAPSHOT (Jenkins build 422) (Git revision d54b87ca0be09b678bb4490060e8f23f890ddb92 branch 'gitBranch') built on time is now by user@host using 1.20.2 amiga/amd64", v.String())

assert.Equal(t, "8.0.30-Vitess", v.MySQLVersion())
assert.Equal(t, "8.0.40-Vitess", v.MySQLVersion())
}

func TestBuildVersionStats(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/semantics/info_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ func getInfoSchema57() map[string][]vindexes.Column {
// getInfoSchema80 returns a map of all information_schema tables and their columns with types
// To recreate this information from MySQL, you can run the test in info_schema_gen_test.go
func getInfoSchema80() map[string][]vindexes.Column {
parser, err := sqlparser.New(sqlparser.Options{MySQLServerVersion: "8.0.30"})
parser, err := sqlparser.New(sqlparser.Options{MySQLServerVersion: "8.0.40"})
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 220dcfd

Please sign in to comment.