Skip to content

Commit ac6e0f3

Browse files
committed
Update bundled MySQL version to 8.0.40
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 <d.bussink@gmail.com>
1 parent 10ff5e3 commit ac6e0f3

File tree

21 files changed

+41
-20
lines changed

21 files changed

+41
-20
lines changed

changelog/22.0/22.0.0/summary.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- **[Support for LAST_INSERT_ID(x)](#last-insert-id)**
1414
- **[Support for Maximum Idle Connections in the Pool](#max-idle-connections)**
1515
- **[Stalled Disk Recovery in VTOrc](#stall-disk-recovery)**
16+
- **[Update default MySQL version to 8.0.40](#mysql-8-0-40)**
1617
- **[Minor Changes](#minor-changes)**
1718
- **[VTTablet Flags](#flags-vttablet)**
1819
- **[Topology read concurrency behaviour changes](#topo-read-concurrency-changes)**
@@ -106,6 +107,26 @@ VTOrc can now identify and recover from stalled disk errors. VTTablets test whet
106107

107108
To opt into this feature, `--enable-primary-disk-stalled-recovery` flag has to be specified on VTOrc, and `--disk-write-dir` flag has to be specified on the vttablets. `--disk-write-interval` and `--disk-write-timeout` flags can be used to configure the polling interval and timeout respectively.
108109

110+
### <a id="mysql-8-0-40"/>Update default MySQL version to 8.0.40</a>
111+
112+
The default major MySQL version used by our `vitess/lite:latest` image is going from `8.0.30` to `8.0.40`.
113+
This change was brought by [Pull Request #17552](https://github.com/vitessio/vitess/pull/17552).
114+
115+
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.
116+
117+
#### <a id="upgrading-to-this-release-with-vitess-operator"/>⚠️Upgrading to this release with vitess-operator
118+
119+
If 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:
120+
121+
1. Add `innodb_fast_shutdown=0` to your extra cnf in your YAML file.
122+
2. Apply this file.
123+
3. Wait for all the pods to be healthy.
124+
4. Then change your YAML file to use the new Docker Images (`vitess/lite:v16.0.0`, defaults to mysql80).
125+
5. Remove `innodb_fast_shutdown=0` from your extra cnf in your YAML file.
126+
6. Apply this file.
127+
128+
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`.
129+
109130
## <a id="minor-changes"/>Minor Changes</a>
110131

111132
#### <a id="flags-vttablet"/>VTTablet Flags</a>

docker/utils/install_dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ mysql57)
9292
;;
9393
mysql80)
9494
if [ -z "$VERSION" ]; then
95-
VERSION=8.0.30
95+
VERSION=8.0.40
9696
fi
9797
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
9898
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

docker/vttestserver/Dockerfile.mysql80

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ USER vitess
5656
COPY docker/vttestserver/setup_vschema_folder.sh /vt/setup_vschema_folder.sh
5757
COPY docker/vttestserver/run.sh /vt/run.sh
5858

59-
CMD /vt/run.sh "8.0.30-Vitess"
59+
CMD /vt/run.sh "8.0.40-Vitess"

examples/operator/101_initial_cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
vtbackup: vitess/lite:latest
1616
vtorc: vitess/lite:latest
1717
mysqld:
18-
mysql80Compatible: mysql:8.0.30
18+
mysql80Compatible: mysql:8.0.40
1919
mysqldExporter: prom/mysqld-exporter:v0.11.0
2020
cells:
2121
- name: zone1

go/flags/endtoend/mysqlctl.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Flags:
7171
--logtostderr log to standard error instead of files
7272
--max-stack-size int configure the maximum stack size in bytes (default 67108864)
7373
--mysql_port int MySQL port. (default 3306)
74-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
74+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
7575
--mysql_socket string Path to the mysqld socket file.
7676
--mysqlctl_client_protocol string the protocol to use to talk to the mysqlctl server (default "grpc")
7777
--mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init

go/flags/endtoend/mysqlctld.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Flags:
9999
--logtostderr log to standard error instead of files
100100
--max-stack-size int configure the maximum stack size in bytes (default 67108864)
101101
--mysql_port int MySQL port (default 3306)
102-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
102+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
103103
--mysql_socket string Path to the mysqld socket file
104104
--mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init
105105
--mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions)

go/flags/endtoend/vtbackup.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Flags:
184184
--mysql-shell-speedup-restore speed up restore by disabling redo logging and double write buffer during the restore process
185185
--mysql-shutdown-timeout duration how long to wait for mysqld shutdown (default 5m0s)
186186
--mysql_port int mysql port (default 3306)
187-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
187+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
188188
--mysql_socket string path to the mysql socket
189189
--mysql_timeout duration how long to wait for mysqld startup (default 5m0s)
190190
--opentsdb_uri string URI of opentsdb /api/put method

go/flags/endtoend/vtbench.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Flags:
6969
--log_err_stacks log stack traces for errors
7070
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
7171
--logtostderr log to standard error instead of files
72-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
72+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
7373
--port int VTGate port
7474
--pprof strings enable profiling
7575
--pprof-http enable pprof http endpoints

go/flags/endtoend/vtclient.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Flags:
3535
--logtostderr log to standard error instead of files
3636
--max_sequence_id int max sequence ID.
3737
--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.
38-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
38+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
3939
--parallel int DMLs only: Number of threads executing the same query in parallel. Useful for simple load testing. (default 1)
4040
--pprof strings enable profiling
4141
--pprof-http enable pprof http endpoints

go/flags/endtoend/vtcombo.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Flags:
245245
--mysql_server_ssl_key string Path to ssl key for mysql server plugin SSL
246246
--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
247247
--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.
248-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
248+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
249249
--mysql_server_write_timeout duration connection write timeout
250250
--mysql_slow_connect_warn_threshold duration Warn if it takes more than the given threshold for a mysql connection to establish
251251
--mysql_tcp_version string Select tcp, tcp4, or tcp6 to control the socket type. (default "tcp")

go/flags/endtoend/vtctld.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Flags:
9898
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
9999
--logtostderr log to standard error instead of files
100100
--max-stack-size int configure the maximum stack size in bytes (default 67108864)
101-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
101+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
102102
--onclose_timeout duration wait no more than this for OnClose handlers before stopping (default 10s)
103103
--onterm_timeout duration wait no more than this for OnTermSync handlers before stopping (default 10s)
104104
--opentsdb_uri string URI of opentsdb /api/put method

go/flags/endtoend/vtctldclient.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Flags:
134134
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
135135
--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.
136136
--logtostderr log to standard error instead of files
137-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
137+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
138138
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
139139
--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)
140140
--server string server to use for the connection (required)

go/flags/endtoend/vtexplain.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Flags:
5959
--log_err_stacks log stack traces for errors
6060
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
6161
--logtostderr log to standard error instead of files
62-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
62+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
6363
--normalize Whether to enable vtgate normalization
6464
--output-mode string Output in human-friendly text or json (default "text")
6565
--planner-version string Sets the default planner to use. Valid values are: Gen4, Gen4Greedy, Gen4Left2Right

go/flags/endtoend/vtgate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Flags:
157157
--mysql_server_ssl_key string Path to ssl key for mysql server plugin SSL
158158
--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
159159
--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.
160-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
160+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
161161
--mysql_server_write_timeout duration connection write timeout
162162
--mysql_slow_connect_warn_threshold duration Warn if it takes more than the given threshold for a mysql connection to establish
163163
--mysql_tcp_version string Select tcp, tcp4, or tcp6 to control the socket type. (default "tcp")

go/flags/endtoend/vtgateclienttest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Flags:
5353
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
5454
--logtostderr log to standard error instead of files
5555
--max-stack-size int configure the maximum stack size in bytes (default 67108864)
56-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
56+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
5757
--onclose_timeout duration wait no more than this for OnClose handlers before stopping (default 10s)
5858
--onterm_timeout duration wait no more than this for OnTermSync handlers before stopping (default 10s)
5959
--pid_file string If set, the process will write its pid to the named file, and delete it on graceful shutdown.

go/flags/endtoend/vttablet.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Flags:
247247
--mysql-shell-should-drain decide if we should drain while taking a backup or continue to serving traffic
248248
--mysql-shell-speedup-restore speed up restore by disabling redo logging and double write buffer during the restore process
249249
--mysql-shutdown-timeout duration timeout to use when MySQL is being shut down. (default 5m0s)
250-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
250+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
251251
--mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init
252252
--mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions)
253253
--onclose_timeout duration wait no more than this for OnClose handlers before stopping (default 10s)

go/flags/endtoend/vttestserver.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Flags:
9696
--mysql-shell-speedup-restore speed up restore by disabling redo logging and double write buffer during the restore process
9797
--mysql_bind_host string which host to bind vtgate mysql listener to (default "localhost")
9898
--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.
99-
--mysql_server_version string MySQL server version to advertise. (default "8.0.30-Vitess")
99+
--mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess")
100100
--mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init
101101
--mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions)
102102
--no_scatter when set to true, the planner will fail instead of producing a plan that includes scatter queries

go/mysql/collations/integration/collations_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var collationEnv *collations.Environment
4545

4646
func init() {
4747
// We require MySQL 8.0 collations for the comparisons in the tests
48-
collationEnv = collations.NewEnvironment("8.0.30")
48+
collationEnv = collations.NewEnvironment("8.0.40")
4949
}
5050

5151
func getSQLQueries(t *testing.T, testfile string) []string {

go/mysql/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package config
22

33
const DefaultSQLMode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
4-
const DefaultMySQLVersion = "8.0.30"
4+
const DefaultMySQLVersion = "8.0.40"
55
const LegacyMySQLVersion = "5.7.31"

go/vt/servenv/buildinfo_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestVersionString(t *testing.T) {
4545

4646
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())
4747

48-
assert.Equal(t, "8.0.30-Vitess", v.MySQLVersion())
48+
assert.Equal(t, "8.0.40-Vitess", v.MySQLVersion())
4949
}
5050

5151
func TestBuildVersionStats(t *testing.T) {

go/vt/vtgate/semantics/info_schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ func getInfoSchema57() map[string][]vindexes.Column {
699699
// getInfoSchema80 returns a map of all information_schema tables and their columns with types
700700
// To recreate this information from MySQL, you can run the test in info_schema_gen_test.go
701701
func getInfoSchema80() map[string][]vindexes.Column {
702-
parser, err := sqlparser.New(sqlparser.Options{MySQLServerVersion: "8.0.30"})
702+
parser, err := sqlparser.New(sqlparser.Options{MySQLServerVersion: "8.0.40"})
703703
if err != nil {
704704
panic(err)
705705
}

0 commit comments

Comments
 (0)