Repository navigation
fix(migrations): let the 2.1.0 relationship type backfill run on utf8mb3 and latin1 MySQL databases (backport 2.1 #37189) - #37190
Conversation
…mb3 and latin1 MySQL databases
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🔴 High risk · The migration converts relation types during a data backfill; an incorrect comparison could mis-match relationships and assign wrong type IDs or JSON. Fixes the 2.1.0 MySQL migration on utf8mb3 and latin1 databases by converting VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Issue
Cherry-pick of #37189 to
2.1(no issue).What it fixes
The 2.1.0 MySQL migration could not finish on a utf8mb3 or latin1 database. One statement in
postDataMigrationSQLScript.sqlappliedCOLLATE utf8mb4_bintoentity_relationship.relationType, which takes the database character set, and MySQL rejects a utf8mb4 collation on a utf8mb3 or latin1 column. The statement now converts the column to utf8mb4 first. The comparison stays case-sensitive, so nothing changes on a utf8mb4 database. Full explanation in #37189.How it was tested
git patch-id --stablematches fix(migrations): let the 2.1.0 relationship type backfill run on utf8mb3 and latin1 MySQL databases #37189.openmetadata-ops.sh migrateon a fresh utf8mb3 database on MySQL 8.0 finishes 2.1.0.