Fix tryBaseTypeScanPlan infinite recursion

query-exec-mode
Jack Christensen 2021-12-31 12:32:46 -06:00
parent c39924d0c6
commit b99d95470f
1 changed files with 1 additions and 1 deletions

View File

@ -850,7 +850,7 @@ func tryBaseTypeScanPlan(dst interface{}) (plan *baseTypeScanPlan, nextDst inter
if dstValue.Kind() == reflect.Ptr { if dstValue.Kind() == reflect.Ptr {
elemValue := dstValue.Elem() elemValue := dstValue.Elem()
nextDstType := elemKindToBasePointerTypes[elemValue.Kind()] nextDstType := elemKindToBasePointerTypes[elemValue.Kind()]
if nextDstType != nil { if nextDstType != nil && dstValue.Type() != nextDstType {
return &baseTypeScanPlan{dstType: dstValue.Type(), nextDstType: nextDstType}, dstValue.Convert(nextDstType).Interface(), true return &baseTypeScanPlan{dstType: dstValue.Type(), nextDstType: nextDstType}, dstValue.Convert(nextDstType).Interface(), true
} }
} }