Skip to content
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
6 changes: 6 additions & 0 deletions changelog/23.0/23.0.0/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ ALTER USER 'vt_repl'@'%' IDENTIFIED WITH caching_sha2_password BY 'your-existing
```

In future Vitess versions, the `mysql_native_password` authentication plugin will be disabled for managed MySQL instances.

#### <a id="mysql-timezone-env"/>MySQL timezone environment propagation</a>

Fixed a bug where environment variables like `TZ` were not propagated from mysqlctl to the mysqld process.
As a result, timezone settings from the environment were previously ignored. Now mysqld correctly inherits environment variables.
⚠️ Deployments that relied on the old behavior and explicitly set a non-UTC timezone may see changes in how DATETIME values are interpreted. To preserve compatibility, set `TZ=UTC` explicitly in MySQL pods.
6 changes: 4 additions & 2 deletions go/vt/mysqlctl/mysqld.go
Original file line number Diff line number Diff line change
Expand Up @@ -1264,17 +1264,19 @@ func (mysqld *Mysqld) OnTerm(f func()) {
}

func buildLdPaths() ([]string, error) {
baseEnv := os.Environ()

vtMysqlRoot, err := vtenv.VtMysqlRoot()
if err != nil {
return []string{}, err
return baseEnv, err
}

ldPaths := []string{
fmt.Sprintf("LD_LIBRARY_PATH=%s/lib/mysql", vtMysqlRoot),
os.ExpandEnv("LD_PRELOAD=$LD_PRELOAD"),
}

return ldPaths, nil
return append(baseEnv, ldPaths...), nil
}

// GetVersionString is part of the MysqlExecutor interface.
Expand Down
9 changes: 9 additions & 0 deletions go/vt/mysqlctl/mysqld_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,12 @@ func TestGetMycnfTemplateMySQL9(t *testing.T) {
assert.Contains(t, template, "# This file is auto-included when MySQL 9.0 or later is detected.")
assert.NotContains(t, template, "mysql_native_password = ON")
}

func TestBuildLdPathsTZ(t *testing.T) {
os.Setenv("TZ", "Europe/Berlin")
defer os.Unsetenv("TZ")

env, err := buildLdPaths()
assert.NoError(t, err)
assert.Contains(t, env, "TZ=Europe/Berlin")
}
Loading