You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hard delete fails on MySQL with 'Illegal mix of collations for operation UNION' #38449
On MySQL, a hard delete of a taggable entity (test case, database service, domain, …) fails with HTTP 500:
java.sql.SQLException: Illegal mix of collations for operation 'UNION'
[statement:"/* TagUsageDAO.listEntityFqnHashes */ SELECT probe.hash FROM ((SELECT fqnHash AS hash FROM ...) UNION ALL ...) probe"]
FqnKeyedRowCleanup (added in #38126) probes every taggable entity table in one UNION ALL. MySQL rejects a UNION whose columns have different collations, and the hash columns do not share one:
most are ascii_bin
newer tables (ai_application_entity, task_entity, …) are utf8mb4_0900_ai_ci
query_entity.fqnHash (renamed in 1.2.0 with no collation) takes the server default
To Reproduce
Run OpenMetadata on MySQL with --collation-server=utf8mb4_unicode_ci (any default other than utf8mb4_0900_ai_ci).
Hard delete a test case: DELETE /api/v1/dataQuality/testCases/{id}?hardDelete=true&recursive=true.
The request returns 500 with the error above.
Expected behavior
The hard delete succeeds whatever the server's default collation.
Activity