tauri-apps / tauri-apps/plugins-workspace

[bug] SQL Plugins Query mysql Return unsupported datatype: BINARY

Open
#2,010 6 comments 0 reactions 0 assignees View on GitHub
good first issue plugin: sql type: bug
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

### Describe the bug

Here's my code
```js
let db = await Database.load(`mysql://${username}:${password}@${host}:${port}/information_schema`)
let res = await db.select(`SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '${database}' AND TABLE_TYPE = 'BASE TABLE'`)
console.info('返回:', res)
```
error:unsupported datatype: BINARY

But when I use:SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES ........
Returns correctly when * is not used

### Reproduction

_No response_

### Expected behavior

_No response_

### Full `tauri info` output

```text
[✔] Environment
- OS: Windows 10.0.22631 x86_64 (X64)
✔ WebView2: 128.0.2739.79
✔ MSVC: Visual Studio Generation Tools 2022
✔ rustc: 1.82.0 (f6e511eec 2024-10-15)
✔ cargo: 1.82.0 (8f40fc59f 2024-08-21)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 18.18.0
- npm: 9.8.1

[-] Packages
- tauri 🦀: 2.0.6
- tauri-build 🦀: 2.0.2
- wry 🦀: 0.46.3
- tao 🦀: 0.30.5
- @tauri-apps/api : 2.0.3
- @tauri-apps/cli : 2.0.5

[-] Plugins
- tauri-plugin-sql 🦀: 2.0.1
- @tauri-apps/plugin-sql : 2.0.0 (outdated, latest: 2.0.1)
- tauri-plugin-log 🦀: 2.0.1
- @tauri-apps/plugin-log : 2.0.0
- tauri-plugin-fs 🦀: 2.0.3
- @tauri-apps/plugin-fs : 2.0.1 (outdated, latest: 2.0.2)
- tauri-plugin-shell 🦀: 2.0.2
- @tauri-apps/plugin-shell : 2.0.1
- tauri-plugin-store 🦀: 2.1.0
- @tauri-apps/plugin-store : 2.1.0

[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- framework: Vue.js
- bundler: Vite
```

### Stack trace

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.