sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

Any driver does not support MySql type Tiny

Open pixelspark opened this issue 1 year ago • 0 comments

Bug Description

When querying from a table that has TINYINT column, an error is returned:

Any driver does not support MySql type MySqlTypeInfo { type: Tiny, flags: ColumnFlags(NOT_NULL), char_set: 63, max_size: Some(1) }

The issue seems to be that this match statement does not handle the Tiny type.

The TINYINT type is commonly used for e.g. booleans. Additionally BIT doesn't appear to be supported as well (should probably be interpreted as actual boolean).

Highly similar to https://github.com/launchbadge/sqlx/issues/2975 (missing a type for Postgres)

Info

  • SQLx version: sqlx v0.7.3 (crates.io)
  • SQLx features enabled: "runtime-tokio", "mysql", "sqlite", "postgres", "any", "macros", "chrono", "time", "bigdecimal", "json",
  • Database server and version: PostgreSQL [15.4 (Debian 15.4-1.pgdg110+1) PostgreSQL 15.4 (Debian 15.4-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit]
  • Operating system: Windows WSL2 (client), Ubuntu (server)
  • rustc --version: rustc 1.74.0 (79e9716c9 2023-11-13)

pixelspark avatar Jan 16 '24 16:01 pixelspark