8000 gorm实例复用导致sql污染 by Jinvic · Pull Request #293 · kingwrcy/moments · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gorm实例复用导致sql污染 #293

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

Merged
merged 1 commit into from
Feb 21, 2025
Merged

gorm实例复用导致sql污染 #293

merged 1 commit into from
Feb 21, 2025

Conversation

Jinvic
Copy link
Contributor
@Jinvic Jinvic commented Feb 21, 2025

这个 PR 做了什么?

#286 中删除了totalCondition,复用tx导致了sql污染,使后续的tx.Count(&total)无法正常获取total,进一步导致memo列表无法正常翻页。

关于gorm实例复用导致sql污染,详见Reusability-and-Safety

将错误带入正式版本真的十分抱歉Orz

@xuewenG xuewenG added the bugfix Bug fix label Feb 21, 2025
@xuewenG xuewenG added this to the v0.2.10 milestone Feb 21, 2025
@xuewenG xuewenG merged commit 0a86dce into kingwrcy:dev Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0