Skip to content

sqlx think medium text as binary? #3390

@yuyang-ok

Description

@yuyang-ok

Bug Description

截屏2024-07-30 08 29 04 thread 'mysql::tests::test_rename' panicked at dbnexus-db/src/mysql.rs:1396:14: called `Result::unwrap()` on an `Err` value: error occurred while decoding column 1: mismatched types; Rust type `alloc::string::String` (as SQL type `VARCHAR`) is not compatible with SQL type `BLOB`

Minimal Reproduction

Info

  • SQLx version: [REQUIRED]
  • SQLx features enabled: [REQUIRED]
sqlx = { version = "0.8.0", features = [
    "runtime-tokio",
    "postgres",
    "sqlite",
    "mysql",
    "bigdecimal",
    "mac_address",
    "chrono",
    "ipnetwork",
    "bit-vec",
    "uuid",
    "json",
] }
  • Database server and version: [REQUIRED] (MySQL / Postgres / SQLite <x.y.z>)
    mysql 9.0.1
  • Operating system: [REQUIRED]
 yuyang@yuyangdembp db % uname -a 
Darwin yuyangdembp 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64 x86_64
  • rustc --version: [REQUIRED]
yuyang@yuyangdembp db % rustc --version 
rustc 1.77.2 (25ef9e3d8 2024-04-09)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions