Skip to content

Fix changelog creation with MyRocks strict collation checks - #1816

Open
ZedingZhang wants to merge 1 commit into
github:masterfrom
ZedingZhang:fix/myrocks-changelog-hint-collation
Open

ZedingZhang wants to merge 1 commit into
github:masterfrom
ZedingZhang:fix/myrocks-changelog-hint-collation

Conversation

@ZedingZhang

@ZedingZhang ZedingZhang commented Dec 2, 2026 •

Copy link
Copy Markdown

A Pull Request should be associated with an Issue.

Fixes #1748.

Description

The changelog's unique index on hint currently inherits ascii_general_ci from the column's character set. MyRocks configurations that require a binary collation for indexed strings can reject the table before migration starts.

Use latin1_bin for the indexed VARCHAR(64). It represents the ASCII hints gh-ost writes and is one of the collations accepted by the server in the issue. The regression test creates the changelog through the applier and checks the collation MySQL assigned to the column.

Verified changelog creation and duplicate-hint updates on both MyRocks (strict collation checking enabled, empty exception list) and InnoDB with MariaDB 10.11.11. This version also accepts the original DDL, which produces ascii_general_ci. The regression assertion failed against the original applier and passed with this change. The Linux build and all six Go packages' short tests passed.

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

Copilot AI adaptive review requested due to automatic review settings December 2, 2026 16:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the changelog collation update.

No open issues 🎉

What changed in this PR

Updates changelog creation to support MyRocks strict collation checks, addressing #1748.

Changes:

  • Uses latin1_bin for the indexed hint column.
  • Adds a regression test verifying the column’s assigned collation.
File Description
go/​logic/​applier.go Sets the changelog hint column to latin1 with latin1_bin collation.
go/​logic/​applier_test.go Tests changelog creation and verifies the hint collation.

Review effort: Balanced (adaptive)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create _ghc table failed When Rocksdb enable rocksdb_strict_collation_check

2 participants