Skip to content

CI: compare MySQL major version numerically on macOS - #310

Merged
byroot merged 1 commit into
trilogy-libraries:mainfrom
fkmy:numeric-mysql-version-check
Aug 1, 2026
Merged

CI: compare MySQL major version numerically on macOS#310
byroot merged 1 commit into
trilogy-libraries:mainfrom
fkmy:numeric-mysql-version-check

Conversation

@fkmy

@fkmy fkmy commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

The test-ruby-mysql job skips creating the mysql_native_password user on MySQL 9.0+, where the server-side plugin was removed. The check matched the version string with =~ ^9, which is wrong now that MySQL uses calendar
versioning (YY.M): the innovation release following 9.7 LTS is 26.7, not 10.0, so "26.7" doesn't start with a 9 and would be treated as pre-9.0 — making the job run CREATE USER ... IDENTIFIED WITH mysql_native_password against a server that no longer has the plugin.

Compare the major version numerically instead, reusing the MYSQL_VERSION env var the step already defines but never used. This matches test/mysql/docker-entrypoint-initdb.d/native_password_user.sh, which already
does the same check numerically (verified on bash 3.2.57, the /bin/bash on macos-latest runners).

Nothing is failing today: 26.7 isn't in the macOS matrix yet because Homebrew has no mysql@26.7 formula. This is a preemptive fix.

References

MySQL 26.7 follows 9.7, switching to calendar versioning (YY.M). `=~ ^9`
does not match it, so 26.7 would be treated as pre-9.0 and get a
mysql_native_password user the server no longer supports.

Reuse the MYSQL_VERSION env var the step already defines, matching how
native_password_user.sh does the same check.

ref
https://blogs.oracle.com/mysql/a-more-predictable-mysql-release-model-calendar-versions-lts-and-innovation
@byroot
byroot merged commit bdd4882 into trilogy-libraries:main Aug 1, 2026
39 checks passed
@fkmy
fkmy deleted the numeric-mysql-version-check branch August 1, 2026 11:29
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

Successfully merging this pull request may close these issues.

2 participants