Skip to content

updateAll with multiple includes silently updates 0 rows on MySQL #3294

Description

@bpamiri

Symptom

UpdateAllIncludeJoinSpec → "updateAll with multiple includes updates matching rows" fails on MySQL only: Expected [1] but received [0]. Every other engine × database leg passes it (SQLite, Postgres, SQL Server, H2, CockroachDB — verified in matrix run 28809821005, lucee7 leg artifacts).

In plain terms: updateAll() with an include= spanning multiple associations appears to update zero rows on MySQL where it updates the matching row everywhere else — a silent bulk-update no-op on a mainstream database.

Dating

Why nobody saw it

Two blind spots stacked: the compat-matrix engine jobs are continue-on-error (the run banner says "success" while legs fail), and required PR CI runs Lucee 7 + SQLite only. Worth fixing the visibility problem alongside the bug — a matrix leg failing a non-soft-fail database should probably fail the job.

Where to look

MySQL's multi-table UPDATE ... JOIN syntax differs from the ANSI/other-adapter forms (no FROM clause; joins live in the UPDATE clause itself; alias handling differs). The multi-include path from #3011's ON-split work is the likely divergence point — the single-include case passes on MySQL, so it's specifically the second join that breaks row matching.

Repro

tools/test-matrix.sh lucee7 mysql
# or directly: /wheels/core/tests?db=mysql&format=json&testBundles=wheels.tests.specs.model.UpdateAllIncludeJoinSpec

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions