39 lines
2.7 KiB
Markdown
39 lines
2.7 KiB
Markdown
# MariaDB document-index collation repair
|
|
|
|
Finding **P9-REQUAL-DB01**, discovered during the actual MariaDB workload's preflight:
|
|
`GET /api/documents` returned500 with `Illegal mix of collations for operation 'UNION'`.
|
|
The timed workload did not start. Its250 synthetic applications and canonical profile were in
|
|
an owned generated schema; cleanup confirmed that schema absent. This is a reproduced provider
|
|
defect, separate from RD21 stale-save safety and from the earlier fixture setup errors.
|
|
|
|
The startup-created schema contains different text collations across the document name columns.
|
|
`DocumentsIndexService` combines CV names, job titles, attachment names, submitted-package names
|
|
and email subjects through seven `UNION ALL` projections. The failing query did not establish a
|
|
common name collation. The previous32-provider-case suite did not exercise this index.
|
|
|
|
Commit `2b26953d6f3c3fdacdffefa2c0a696c9084f1afd` applies explicit
|
|
`CONVERT(expression USING utf8mb4) COLLATE utf8mb4_bin` to those **read-only name projections**.
|
|
The binary collation retains the existing explicit lowercase/Nordic fold and accent-sensitive
|
|
search behavior; a general accent-insensitive collation would change that contract. Every SQL
|
|
expression is a compile-time source expression. Owner/search/filter values stay parameters.
|
|
Tenant joins, metadata/content exclusion, API response shape, stored values, table collations,
|
|
migrations and the SQLite expressions are unchanged.
|
|
|
|
Three new real-provider tests use the existing startup/version/schema guards. Before the fix,
|
|
the same three cases fail on the UNION collation error; after it they pass. They cover:
|
|
|
|
- Actual mixed startup collations and all seven source types, total/page/order agreement,
|
|
recorded metadata, excluded content and independent unchanged persisted snapshots.
|
|
- Unicode accent sensitivity, literal `%`, `_`, `!`, deterministic ties and metadata-only search.
|
|
- Owner isolation, foreign/damaged associations, foreign history exclusion and filters.
|
|
|
|
Targeted RED/GREEN reports remain in
|
|
`.artifacts/p9-requal-01/documents-provider-{red,green}/mariadb.trx` and `tests.log`.
|
|
These targeted results are not added to the full suite. The fresh full successor is **35/35**
|
|
MariaDB cases with zero failures/skips; full backend **1123/1123** also passes. The normal push
|
|
and remote equality at this source checkpoint were verified; `main` remains `5f835e54a9b74e6b71418422e28431b2af06453f`.
|
|
|
|
Independent review checked the service, controller validation, three tests and both retained TRX
|
|
reports and found no actionable issues. Broader fresh browser, workload and output successors are
|
|
reported separately in the final addendum; this repair alone is not Phase9 or production acceptance.
|