Skip to content

Validate SET bitmask conversion - #85

Merged
nickvanw merged 1 commit into
mainfrom
fix/set-bitmask-conversion
Jun 16, 2026
Merged

nickvanw merged 1 commit into
mainfrom
fix/set-bitmask-conversion

Conversation

@nickvanw

Copy link
Copy Markdown
Contributor

Summary

  • parse numeric SET masks as uint64 instead of signed int64
  • walk SET bitmap bits directly and preserve declaration order
  • return an explicit error when a numeric mask references an unmapped SET value instead of panicking
  • serialize numeric zero as the empty SET value

Evidence

The previous converter formatted the numeric mask as binary text and indexed setValues without bounds checks. A mask with a set bit beyond the parsed metadata could panic, and valid 64-bit SET masks above MaxInt64 were treated as raw strings. Vitess handles SET masks as unsigned 64-bit bitmaps and errors on unmapped bits.

Validation

  • GOCACHE=/tmp/fivetran-bugbash.qcjUz1/gocache go test ./cmd/internal/server/handlers -run 'TestSetConverter'
  • GOCACHE=/tmp/fivetran-bugbash.qcjUz1/gocache go test ./cmd/internal/server/handlers
  • git diff --check

@nickvanw
nickvanw merged commit 5522b4b into main Jun 16, 2026
7 checks passed
@nickvanw
nickvanw deleted the fix/set-bitmask-conversion branch June 16, 2026 00:33
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