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

[panic] db.Transaction panic after close() #3380

Closed
zzjin opened this issue Sep 3, 2020 · 0 comments
Closed

[panic] db.Transaction panic after close() #3380

zzjin opened this issue Sep 3, 2020 · 0 comments
Assignees
Labels
type:with reproduction steps with reproduction steps

Comments

@zzjin
Copy link

zzjin commented Sep 3, 2020

GORM Playground Link

go-gorm/playground#104

Description

when use db.Transaction on unexpect state such as call after DB().Close() panic.
case: maybe call direct to sql/mysql Close() cannot clean some gorm spec states.

当在某些其他位置数据库被关闭之后再执行db.Transaction直接崩溃
可能的原因:现在直接暴露关闭原生的sql的Close()方法可能导致了gorm自己的内部状态的不一致

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:with reproduction steps with reproduction steps
Projects
None yet
Development

No branches or pull requests

2 participants