Skip to content

fix: support MySQL []byte values in Version.Scan - #225

Merged
tgross merged 1 commit into
hashicorp:mainfrom
sishui:main
Oct 12, 2026
Merged

tgross merged 1 commit into
hashicorp:mainfrom
sishui:main

Conversation

@sishui

@sishui sishui commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Description

Description

Update Version.Scan() to support []byte values in addition to string and nil.

MySQL VARCHAR columns may be returned as []byte by database/sql drivers. Currently, Version.Scan() does not handle []byte, causing a scan error when reading version strings from MySQL.

This change allows Version.Scan() to parse []byte values directly, improving compatibility with MySQL drivers.

@sishui
sishui requested a review from a team as a code owner October 9, 2026 14:42
@hashicorp-cla-app

hashicorp-cla-app Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@tgross tgross left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@tgross
tgross merged commit 3183616 into hashicorp:main Oct 12, 2026
4 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.

2 participants