Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] MySQL VARCHAR incorrectly interpreted as VARBINARY #2274

Open
tmg0 opened this issue Jan 7, 2025 · 2 comments
Open

[bug] MySQL VARCHAR incorrectly interpreted as VARBINARY #2274

tmg0 opened this issue Jan 7, 2025 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers plugin: sql status: upstream This issue needs to be fixed in an upstream project

Comments

@tmg0
Copy link

tmg0 commented Jan 7, 2025

Description

I'm currently using tauri-plugin-sql in my project with mysql, but in some tables, fields with the VARCHAR type are incorrectly interpreted as VARBINARY and return an error:

unsupported datatype: VARBINARY.

I found a similar issue in sqlx repo here and the pr in comments show that rolling back to version v0.7.4 resolves the issue.

I locally modified the version to 0.7.4 and downgraded the tauri-plugin-sql to 2.0.0-beta.9, which resolved the problem.

But I am concerned about this would lose some bug fix of this plugin, so If it's possible to rollback the version of sqlx to 0.7 before they resolve it?

Tauri info output

[✔] Environment
    - OS: Mac OS 15.2.0 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 18.20.4
    - pnpm: 9.15.1
    - npm: 10.7.0
    - bun: 1.1.30

[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - @tauri-apps/api : 2.1.1 (outdated, latest: 2.2.0)
    - @tauri-apps/cli : 2.1.0 (outdated, latest: 2.2.2)

[-] Plugins
    - tauri-plugin-sql 🦀: 2.0.0-beta.9
    - @tauri-apps/plugin-sql : 2.2.0
    - tauri-plugin-store 🦀: 2.2.0
    - @tauri-apps/plugin-store : 2.2.0
    - tauri-plugin-log 🦀: 2.2.0
    - @tauri-apps/plugin-log : not installed!

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:3000/
    - framework: Vue.js (Nuxt)
    - bundler: Webpack
@FabianLars
Copy link
Member

meh, i'd really hate to downgrade sqlx but i guess there's no way around it looking at their activity :/

@FabianLars FabianLars added bug Something isn't working good first issue Good for newcomers status: upstream This issue needs to be fixed in an upstream project plugin: sql labels Jan 7, 2025
@tmg0
Copy link
Author

tmg0 commented Jan 9, 2025

Thank you for the response !

I’m not quite sure if this is a common issue because it seems to only occur under specific table collation types like utf8mb4_bin

Maybe locally downgrade the version of tauri-plugin-sql and sqlx only when necessary before they fix that is also acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers plugin: sql status: upstream This issue needs to be fixed in an upstream project
Projects
None yet
Development

No branches or pull requests

2 participants