CI: compare MySQL major version numerically on macOS - #310
Merged
Conversation
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
approved these changes
Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
test-ruby-mysqljob skips creating themysql_native_passworduser 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 calendarversioning (YY.M): the innovation release following 9.7 LTS is 26.7, not 10.0, so
"26.7"doesn't start with a9and would be treated as pre-9.0 — making the job runCREATE USER ... IDENTIFIED WITH mysql_native_passwordagainst a server that no longer has the plugin.Compare the major version numerically instead, reusing the
MYSQL_VERSIONenv var the step already defines but never used. This matchestest/mysql/docker-entrypoint-initdb.d/native_password_user.sh, which alreadydoes the same check numerically (verified on bash 3.2.57, the
/bin/bashon macos-latest runners).Nothing is failing today: 26.7 isn't in the macOS matrix yet because Homebrew has no
mysql@26.7formula. This is a preemptive fix.References