Skip to content

Fix segmentMatchNONE system test for MySQL 8.0#135

Merged
sgiehl merged 3 commits into
prepare6xfrom
dev-20334
Jul 20, 2026
Merged

Fix segmentMatchNONE system test for MySQL 8.0#135
sgiehl merged 3 commits into
prepare6xfrom
dev-20334

Conversation

@sgiehl

@sgiehl sgiehl commented Jul 18, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the TwoVisitsWithCustomVariablesSegmentMatchNONE system test under MySQL 8.0, and updates the plugin test workflow to run against the new minimum supported database versions.

Core PR: matomo-org/matomo#24858

Test fix (MySQL 8.0)

The test built a segment comparing every registered segment to a placeholder value. For date/time segments (e.g. visitEndServerDate, visitServerHour, visitEndServerYear, …) it used the string 'campaign', which MySQL 8.0 rejects as an invalid DATE value (SQLSTATE[HY000] 1525); MySQL 5.7 silently tolerated it. Each date/time segment now gets a valid, type-appropriate value (a date for DATE() segments, an integer for the HOUR()/MINUTE()/YEAR()/… extractions). The matched result is unchanged — the segment still matches no visits via the impossible deviceType==car browser condition — so the expected output files are untouched.

Workflow

  • PluginTests now runs a database matrix: MySQL 8.0 and MariaDB 10.6.
  • UI runs on MySQL 8.0.

Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

sgiehl added 2 commits July 18, 2026 09:51
Comparing date/time segments against the placeholder string 'campaign'
(e.g. visitEndServerDate != 'campaign') is rejected by MySQL 8.0 as an
invalid DATE value; MySQL 5.7 tolerated it. Give each date/time segment a
valid, type-appropriate value instead - a date for DATE() segments and an
integer for the HOUR()/MINUTE()/YEAR()/... extractions - so they stay
covered and the query runs on MySQL 8.0. The matched result is unchanged
(the segment still matches no visits via the impossible deviceType condition).
The workflow inherited the shared action's MySQL 5.7 default, which is below
Matomo's new minimum. Pin the database-backed jobs to the supported floor:
PluginTests now runs a MySQL 8.0 + MariaDB 10.6 matrix, and the UI job runs
on MySQL 8.0.
PluginTests runs a MySQL + MariaDB matrix; the upload-artifacts condition
matched both legs and uploaded twice. Restrict the upload to the MySQL leg.
@sgiehl
sgiehl marked this pull request as ready for review July 20, 2026 11:10
@sgiehl
sgiehl merged commit cfcca86 into prepare6x Jul 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant