Row.Scan 可能返回错误的结果 #2134
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2134
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
当扫描一个带有二进制列的 表时,如果用来保存结果的 数据结构中的 []byte 的长度不为 0,那它会将当前行的部分结果拷贝到 []byte 中,也没有更新它的长度。
相关代码在 sessions.go 中 582 行。
建议 对于 长度不为0 的 []byte, 先将长度改成 0, 然后再 append 就行了,在确保正确的情况下,尽量沿用已有的内存。
我们目前碰到了这个问题,在使用时做了绕过处理: https://github.com/juicedata/juicefs/pull/1854