Remove NextGen version handling code from mysql package#4
Merged
kyleconroy merged 1 commit intomainfrom Apr 26, 2026
Merged
Conversation
NormalizeTiDBReleaseVersionForNextGen, BuildTiDBXReleaseVersion, and BuildTiDBXServerVersion were carried over from the upstream TiDB parser but are TiDB-server release-packaging concerns rather than parsing concerns. Inside this repository they were only referenced by their own tests, so drop the helpers, the tests, and their supporting constants. The legacyTiDBReleaseVersionPlaceholder constant doubled as the initial value of the externally visible TiDBReleaseVersion variable, so inline the placeholder string there. This drops the github.com/coreos/go-semver dependency, which was used solely by BuildTiDBXReleaseVersion. https://claude.ai/code/session_011eUiTSJanyruVRnV5b7fJw
3f46349 to
1dc757d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes NextGen-specific version handling functionality from the mysql package, including version conversion utilities and related constants. The code being removed was used to convert TiDB release versions into NextGen-specific formats.
Key Changes
NormalizeTiDBReleaseVersionForNextGen()function that converted legacy placeholders to NextGen placeholdersBuildTiDBXReleaseVersion()function that converted semantic versions to NextGen format (CLOUD.<year-month>.<fix>)BuildTiDBXServerVersion()function that built MySQL-compatible server version strings with NextGen formattidbXReleaseVersionPrefix("CLOUD.")tidbXPlaceholderReleaseVersion(v26.3.0 placeholder)TiDBXVerMinYearandTiDBXVerMaxYear(year validation bounds)legacyTiDBReleaseVersionPlaceholderconstant value directly intoTiDBReleaseVersioninitializationgithub.com/coreos/go-semverdependency from go.modImplementation Details
The
TiDBReleaseVersionvariable now uses the literal placeholder value"v8.4.0-this-is-a-placeholder"instead of referencing a named constant, simplifying the initialization while maintaining the same behavior for the legacy version format.https://claude.ai/code/session_011eUiTSJanyruVRnV5b7fJw