]> git.ipfire.org Git - thirdparty/patchwork.git/commit
docker: Update to latest stable MySQL, PostgreSQL
authorStephen Finucane <stephen@that.guru>
Sat, 6 Jun 2026 11:50:01 +0000 (12:50 +0100)
committerStephen Finucane <stephenfinucane@hotmail.com>
Sun, 7 Jun 2026 15:10:53 +0000 (16:10 +0100)
commit035ef3261dc4a6dc33aa73e10b3a17ac46b4cf2b
treec048c0b52c6c319577973dec950eb725c67684f0
parentff03dafba38f553c0b9447092742c2222695af86
docker: Update to latest stable MySQL, PostgreSQL

MySQL 9.7 changed the default gtid_mode from OFF to ON (since 9.5). When
the MySQL Docker container initialises, the init scripts run with
GTID=ON, leaving non-empty GTID_EXECUTED in the binary log even though
the final server starts with --gtid-mode=OFF.

This causes two problems:

1. mysqldump always includes SET @@GLOBAL.GTID_PURGED when cloning
   test databases for parallel tests. Restoring this requires
   SYSTEM_VARIABLES_ADMIN, which was not granted.

2. mysqldump requires PROCESS to dump tablespace information. While
   PROCESS was being granted, SYSTEM_VARIABLES_ADMIN was missing
   from the grants, causing clone failures (exit code 5) for Django
   6.0's stricter parallel test runner.

Fix both issues by:

- Running RESET BINARY LOGS AND GTIDS before granting privileges,
  which clears the GTID state left by the init phase so mysqldump
  no longer emits GTID_PURGED statements.

- Adding SYSTEM_VARIABLES_ADMIN to the privilege grants so that if
  any GTID state is present (e.g. in future MySQL versions), the
  restore can set GTID_PURGED.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
.github/workflows/ci.yaml
docker-compose-pg.yml
docker-compose.yml
tools/docker/mysql-client.cnf [new file with mode: 0644]