Skip to content

Conversation

@Rentacookie
Copy link
Contributor

@Rentacookie Rentacookie commented Mar 25, 2025

MySQL uses the same type code for Varbinary and Varchar columns. This then requires additional interrogation of the column metadata to correctly determine the type. Previously we just checked the binary flag in the column metadata to determine if a column was in fact Varbinary. But it turns out Varchar columns with binary encoding set will also have the binary flag set, leading to mis-identifcation. Instead we now check the characterSet for the column for the binary characterSet which seems to only be set for actual Varbinary columns

@changeset-bot
Copy link

changeset-bot bot commented Mar 25, 2025

🦋 Changeset detected

Latest commit: e7ad97b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@powersync/service-module-mysql Patch
@powersync/service-image Patch
@powersync/service-core Patch
@powersync/service-core-tests Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-module-mongodb Patch
@powersync/service-module-postgres-storage Patch
@powersync/service-module-postgres Patch
test-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rentacookie Rentacookie marked this pull request as ready for review March 25, 2025 07:48
@Rentacookie Rentacookie requested a review from rkistner March 25, 2025 07:48
@Rentacookie Rentacookie marked this pull request as draft March 25, 2025 09:14
@Rentacookie Rentacookie marked this pull request as ready for review March 25, 2025 12:24
@Rentacookie Rentacookie merged commit a6dee95 into main Mar 25, 2025
21 checks passed
@Rentacookie Rentacookie deleted the bugfix/mysql-encoded-varchar-identification branch March 25, 2025 12:54
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.

3 participants