diff --git a/CHANGELOG.md b/CHANGELOG.md index a9d979920..61eb63e40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Fixed scan to optional uuid + ## v3.86.0 * Add workaround for bug in uuid send/receive from server. It is migration version. All native code and most database sql code worked with uuid continue to work. diff --git a/internal/table/scanner/scanner.go b/internal/table/scanner/scanner.go index 5a4dc38bc..83120080d 100644 --- a/internal/table/scanner/scanner.go +++ b/internal/table/scanner/scanner.go @@ -1101,6 +1101,13 @@ func (s *valueScanner) scanOptional(v interface{}, defaultValueForOptional bool) val := value.NewUUIDIssue1501FixedBytesWrapper(src) *v = &val } + case **uuid.UUID: + if s.isNull() { + *v = nil + } else { + src := s.uuid() + *v = &src + } case **interface{}: if s.isNull() { *v = nil