Skip to content

Change coordinates column in checkpoint table to TEXT - #1611

Merged
meiji163 merged 1 commit into
masterfrom
checkpoint-coord-text
Dec 5, 2025
Merged

Change coordinates column in checkpoint table to TEXT#1611
meiji163 merged 1 commit into
masterfrom
checkpoint-coord-text

Conversation

@meiji163

@meiji163 meiji163 commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Description

This PR changes the gh_ost_chk_coords column in the checkpoint table from VARCHAR(4096) to ascii TEXT column, so it can store GTID sets up to 65,535 characters long.

In case this PR introduced Go code changes:

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

@meiji163
meiji163 marked this pull request as ready for review December 3, 2025 01:52
Copilot AI review requested due to automatic review settings December 3, 2025 01:52

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.

Pull request overview

This PR changes the gh_ost_chk_coords column in the checkpoint table from VARCHAR(4096) to TEXT with ASCII charset to support storing larger GTID sets (up to 65,535 characters).

Key changes:

  • Column type changed from VARCHAR(4096) to TEXT charset ascii to accommodate GTID sets that can exceed the previous 4,096 character limit

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go/logic/applier.go
"`gh_ost_chk_id` bigint auto_increment primary key",
"`gh_ost_chk_timestamp` bigint",
"`gh_ost_chk_coords` varchar(4096)",
"`gh_ost_chk_coords` text charset ascii",

Copilot AI Dec 3, 2025

Copy link

Choose a reason for hiding this comment

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

The column definition should include an explicit NULL constraint specification. While TEXT columns are nullable by default, it's best practice to be explicit about nullability for clarity and consistency. Consider whether this column should be NOT NULL (like the similar value column in the changelog table at line 407) or explicitly allow NULL.

Suggested change
"`gh_ost_chk_coords` text charset ascii",
"`gh_ost_chk_coords` text charset ascii NOT NULL",

Copilot uses AI. Check for mistakes.
@hemode

hemode commented Dec 3, 2025 via email

Copy link
Copy Markdown

@meiji163
meiji163 merged commit 982eefb into master Dec 5, 2025
15 checks passed
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.

4 participants