Do not recursively call public PlanScan that caches

Otherwise, wrapper types get cached. Wrapper types are expected to fail
most of the time. These failures should not be cached. In addition,
wrappers wrap multiple different types so it doesn't make sense to cache
results of a wrapper.
This commit is contained in:
Jack Christensen 2022-03-04 11:04:46 -06:00
parent a8f6674a07
commit 45a8b00271

View File

@ -1068,7 +1068,7 @@ func (m *Map) planScan(oid uint32, formatCode int16, target interface{}) ScanPla
for _, f := range m.TryWrapScanPlanFuncs {
if wrapperPlan, nextDst, ok := f(target); ok {
if nextPlan := m.PlanScan(oid, formatCode, nextDst); nextPlan != nil {
if nextPlan := m.planScan(oid, formatCode, nextDst); nextPlan != nil {
if _, failed := nextPlan.(*scanPlanFail); !failed {
wrapperPlan.SetNext(nextPlan)
return wrapperPlan