Skip to content

Test against MySQL and MariaDB in CI - #16

Merged
bpepple merged 1 commit into
mainfrom
mysql
Nov 3, 2026
Merged

bpepple merged 1 commit into
mainfrom
mysql

Conversation

@bpepple

@bpepple bpepple commented Nov 3, 2026

Copy link
Copy Markdown
Member

Summary

Adds a CI job that runs the test suite on MySQL 8.4 and MariaDB 11.4, so izaya can say it supports them rather than ruling them out.

  • tests/settings.py: setting MYSQL_HOST (and optionally MYSQL_PORT, MYSQL_USER and MYSQL_PASSWORD) switches the tests to MySQL, just as PGHOST switches them to PostgreSQL.
  • testing.yml: a new mysql job runs once with MySQL and once with MariaDB, using a service container, the mysqlclient driver and Python 3.14. Like the PostgreSQL job, it skips the browser tests.
  • The two zero-primary-key tests are skipped where the database can't store 0 in an AutoField, as on MySQL and MariaDB.

The rest of the suite, ranking included, passes unchanged on both.

Ranking and accents

With their default _ai_ci collations, MySQL and MariaDB ignore accents in iexact, istartswith and icontains, but not in iregex. Ranking uses iregex to find matches at the start of a word, so for the query cafe, "Café" ranks as a whole-value match but "Le Café" ranks with everything else rather than as a word-start match. I've documented this in the README rather than changed it.

Add a MYSQL_HOST switch to the test settings and a CI job that runs the suite on MySQL 8.4 and MariaDB 11.4. Skip the zero primary key tests where the backend can't store a zero AutoField, and document that the default _ai_ci collations ignore accents in every ranking tier but the start of a word.
@bpepple bpepple self-assigned this Nov 3, 2026
@bpepple
bpepple merged commit 26668be into main Nov 3, 2026
8 checks passed
@bpepple
bpepple deleted the mysql branch November 3, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant