Skip to content

Support MySQL 9.7 and 26.x (based on #146) - #160

Open
cyppe wants to merge 1 commit into
krowinski:masterfrom
cyppe:mysql-9-ci
Open

cyppe wants to merge 1 commit into
krowinski:masterfrom
cyppe:mysql-9-ci

Conversation

@cyppe

@cyppe cyppe commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Based on #146 by @DZunke, thank you; this also fixes the matrix so each job runs its own MySQL version, which the maintainer noted. Supersedes #146.

Changes

  • MySQLRepository::getMasterStatus() uses version_compare() (as BinLogSocketConnect already does), so MySQL 9.x and 26.x get SHOW BINARY LOG STATUS. SHOW MASTER STATUS was removed in MySQL 8.4, so on 9.x the old str_starts_with('8.4') check broke every connection that starts without a binlog position.
  • MariaDB keeps SHOW MASTER STATUS. Without a MariaDB guard, version_compare() treats 11.4.13-MariaDB as newer than 8.4.0 and sends SHOW BINARY LOG STATUS, which MariaDB rejects. That was the cause of the 8 red MariaDB jobs on Support MySQL 9.0 in CI #146.
  • CI matrix: adds MySQL 9.7 (LTS) and 26.10 (latest), both of which shogo82148/actions-setup-mysql supports now (its README lists 26.10, 26.7, 9.7 LTS and 8.4 LTS).
  • Unit test: a data provider covering which statement each server version gets (5.7, 8.0, 8.4, 9.7, 26.10, MariaDB 10.6 and 11.4).

Matrix: one version per job

On current master each job already installs and tests its own server. The setup step installs from /opt/hostedtoolcache/mysql/<version>, and BaseCase prints >> Tests running against MySQL server version: … (added after #146 was opened), for example 5.7.44-log, 8.4.13 and 11.4.13-MariaDB-log in the jobs of a recent run. The new 9.7 and 26.10 jobs print the same line, so each job's log shows which server it ran against.

Local results (Docker, PHP 8.4, full suite)

Server This PR Before
MySQL 8.4.13 OK (335 tests)
MySQL 9.7.4 OK (335 tests) 82 errors (SHOW MASTER STATUS)
MySQL 26.10.0 OK (335 tests)
MariaDB 10.6.28 OK, 2 skipped, 4 incomplete (same as master CI)
MariaDB 11.4.13 OK, 2 skipped, 4 incomplete (same as master CI) 82 errors with #146 alone (SHOW BINARY LOG STATUS)

PHPStan: no errors.

The PHP 8.2 jobs need #159 (PHPUnit 11.5 for PHP 8.2) to install; this PR does not depend on it otherwise.

Sources: MySQL 8.4 release notes: SHOW MASTER STATUS removed, SHOW BINARY LOG STATUS, MariaDB SHOW BINLOG STATUS / SHOW MASTER STATUS, actions-setup-mysql supported versions.

🤖 Generated with Claude Code

Use version_compare() for the SHOW BINARY LOG STATUS switch so MySQL 9.x
and 26.x get it too, and skip MariaDB, whose 10.x/11.x version string
would otherwise compare as newer than MySQL 8.4. Add MySQL 9.7 (LTS) and
26.10 to the CI matrix.

Co-authored-by: Denis Zunke <1244235+DZunke@users.noreply.github.com>
@cyppe cyppe mentioned this pull request Nov 14, 2026
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.

1 participant