fix(source-mysql): derive unicode interpolation base from sampled boundaries to fix collation error 1267 - #83239
Conversation
…ndaries to fix collation error 1267
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
|
/publish-connectors-prerelease connector=source-mysql
|
|
/format-fix
|
|
Note Autopilot progressive rollouts are not enabled for the following modified connector(s):
This is a courtesy heads-up only — it does not block merge or fail any check. |
|
Deploy preview for airbyte-docs ready!
Deployed with vercel-action |
|
|
↪️ Triggering Reason: Draft PR whose only red checks are the progressive-rollout gate (unrelated to the collation fix); validating the MySQL unicode interpolation change against live connections is the next pipeline gate. |
|
🟢 Fix Proven
Next steps
Details: connector, versions, baseline
Evidence plan (proving / disproving criteria)Proving: synthetic partition boundaries stay within the code-point range of the sampled min/max PK values, so a text PK on a legacy charset ( Disproving: the 1267/3988 error persists on the target; new errors or missing streams on the target only; or fewer records on the target than control (which would indicate lost partitions rather than a fix). Strategy: (1) regression tests in comparison mode, all streams, cold read — required first for sources; (2) escalate to a local control-vs-target reproduction once the harness proved unable to produce READ evidence; (3) corroborate with the live sync on the already-pinned test source; (4) unit tests at PR head. Result of the ranked attempts (all comparison mode, all streams, cold read, control
No attempt produced any signal against the PR: every failure was reproduced identically by the control version, i.e. it is environmental or harness-related. Pre-flight checks
|
|
↪️ Triggering Reason: |
Reviewing PR for connector safety and quality.
|
🛡️ AI PR Review Report🟢 Review Action: APPROVEDAll 12 gates passed. 🔶 Risk Level: 3/5Logic change to existing partition-boundary generation for text primary keys in 📋 PR DetailsConnector(s): 🔍 Gate Evaluation DetailsGate-by-Gate Analysis
Files that triggered gate evaluation
Keywords / patterns matched
📚 Evidence ConsultedEvidence
|
|
↪️ Triggering Reason: |
Auto-merge evaluation: FAILEligibility (all must pass)
|
|
🙋 Escalated to #human-in-the-loop per Hands-Free AI Triage Project triage next step. Routed to the DB/DW connectors oncall. |
What
Fixes https://github.com/airbytehq/oncall/issues/13104
Fixes error code 1267 (
Illegal mix of collations), which occurred when partitioning text primary keys stored in utf8mb3 (the default for UTF8 in MariaDB) or other legacy character set columns. Previously, string partition boundaries were generated using the max Unicode value (U+10FFFF) as the interpolation base. This could produceutf8mb4characters even when both source boundaries contained onlyutf8mb3characters. MySQL could not compare these generated boundaries with an utf8mb3 column, resulting in a collation mismatch.How
StringInterpolationUtils.unicodeInterpolatedStrings()so that the interpolation base is determined by the highest code point present in the provided bounds. This keeps generated code points within the range of the boundaries and reduces the risk of generating characters unsupported by the column's character set.U+D800or higher, and the original bounds are returned.StringInterpolationUtilTestverifying that:Review guide
User Impact
Can this PR be safely reverted and rolled back?