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 bigint unsigned null column scan to err type int64 #1612

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Zhang Xiang <angwerzx at 126.com>
Zhenye Xie <xiezhenye at gmail.com>
Zhixin Wen <john.wenzhixin at gmail.com>
Ziheng Lyu <zihenglv at gmail.com>
Jiabin Zhang <jiabin.z at qq.com>

# Organizations

Expand Down
4 changes: 4 additions & 0 deletions fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
scanTypeInt64 = reflect.TypeOf(int64(0))
scanTypeNullFloat = reflect.TypeOf(sql.NullFloat64{})
scanTypeNullInt = reflect.TypeOf(sql.NullInt64{})
scanTypeNullUInt = reflect.TypeOf(sql.Null[uint64]{})

Check failure on line 131 in fields.go

View workflow job for this annotation

GitHub Actions / lint

undefined: sql.Null

Check failure on line 131 in fields.go

View workflow job for this annotation

GitHub Actions / lint

undefined: sql.Null

Check failure on line 131 in fields.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 1.21, 9.0)

undefined: sql.Null

Check failure on line 131 in fields.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest, 1.20, 9.0)

undefined: sql.Null
scanTypeNullTime = reflect.TypeOf(sql.NullTime{})
scanTypeUint8 = reflect.TypeOf(uint8(0))
scanTypeUint16 = reflect.TypeOf(uint16(0))
Expand Down Expand Up @@ -185,6 +186,9 @@
}
return scanTypeInt64
}
if mf.flags&flagUnsigned != 0 {
return scanTypeNullUInt
}
return scanTypeNullInt

case fieldTypeFloat:
Expand Down
Loading