Skip to content

Update dev tooling to latest MySQL, PostgreSQL#648

Merged
stephenfin merged 4 commits into
mainfrom
database-update
Jun 7, 2026
Merged

Update dev tooling to latest MySQL, PostgreSQL#648
stephenfin merged 4 commits into
mainfrom
database-update

Conversation

@stephenfin

Copy link
Copy Markdown
Member
  • CI: Update to latest stable MySQL, PostgreSQL
  • Fix compat with latest patchwork/pyenv image

@stephenfin stephenfin force-pushed the database-update branch 5 times, most recently from 8f60979 to cb16019 Compare June 7, 2026 13:44
stephenfin and others added 4 commits June 7, 2026 14:47
We switched to the Ubuntu 24.04 base image some time back. This includes
an ubuntu user that conflicts with the patchwork user we were creating.
Simplify this by using the ubuntu user instead.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Stephen Finucane <stephen@that.guru>
These are also compatible with Debian.

Signed-off-by: Stephen Finucane <stephen@that.guru>
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>
@stephenfin stephenfin merged commit 035ef32 into main Jun 7, 2026
11 checks passed
@stephenfin stephenfin deleted the database-update branch June 7, 2026 15:11
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