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

FIX sql 1.7.1 bug #588

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

FIX sql 1.7.1 bug #588

wants to merge 4 commits into from

Conversation

ChenSee
Copy link

@ChenSee ChenSee commented Aug 15, 2023

go-sql-driver 1.7.1 新版本返回菜单id数据为[]uint8,将其转换为int解决问题

@foundVanting
Copy link

👍

@Zyn0423
Copy link

Zyn0423 commented Sep 27, 2023

看群主还没合代码,建议先退回 mysql v1.5.0 版本

  • [go get -u github.com/go-sql-driver/mysql@v1.5.0 ]
  • [go mod tidy]

@kurefm
Copy link

kurefm commented Nov 27, 2023

根本原因是mysql驱动从1.7.0增加了unsigned int类型的返回

return unsigned in database type name when necessary (go-sql-driver/mysql#1238)

考虑修改 https://github.com/GoAdminGroup/go-admin/blob/master/modules/db/converter.go#L12C6-L12C19 的SetColVarType,将所有unsigned int都用int64去scan才能解决根本问题

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.

None yet

5 participants