From 3a9aa6cf6f48f82c562aab99fa7353e60d9175e7 Mon Sep 17 00:00:00 2001 From: Yiding Cui Date: Fri, 11 Jan 2019 16:09:42 +0800 Subject: [PATCH] fix merge error --- statistics/feedback.go | 8 ++++---- statistics/update.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/statistics/feedback.go b/statistics/feedback.go index d960c8ac6f9d0..aedf265db3186 100644 --- a/statistics/feedback.go +++ b/statistics/feedback.go @@ -294,7 +294,7 @@ func buildBucketFeedback(h *Histogram, feedback *QueryFeedback) (map[int]*Bucket } total := 0 sc := &stmtctx.StatementContext{TimeZone: time.UTC} - min, max := getMinValue(h.tp), getMaxValue(h.tp) + min, max := getMinValue(h.Tp), getMaxValue(h.Tp) for _, fb := range feedback.feedback { skip, err := fb.adjustFeedbackBoundaries(sc, &min, &max) if err != nil { @@ -1078,14 +1078,14 @@ func (q *QueryFeedback) dumpRangeFeedback(sc *stmtctx.StatementContext, h *Handl ran.LowVal[0].SetBytes(lower) ran.HighVal[0].SetBytes(upper) } else { - if !supportColumnType(q.hist.tp) { + if !supportColumnType(q.hist.Tp) { return nil } if ran.LowVal[0].Kind() == types.KindMinNotNull { - ran.LowVal[0] = getMinValue(q.hist.tp) + ran.LowVal[0] = getMinValue(q.hist.Tp) } if ran.HighVal[0].Kind() == types.KindMaxValue { - ran.HighVal[0] = getMaxValue(q.hist.tp) + ran.HighVal[0] = getMaxValue(q.hist.Tp) } } ranges := q.hist.SplitRange(sc, []*ranger.Range{ran}, q.tp == indexType) diff --git a/statistics/update.go b/statistics/update.go index b65c4cdbb7734..bc1e03e739830 100644 --- a/statistics/update.go +++ b/statistics/update.go @@ -562,7 +562,7 @@ func (h *Handle) handleSingleHistogramUpdate(is infoschema.InfoSchema, rows []ch } q := &QueryFeedback{} for _, row := range rows { - err1 := decodeFeedback(row.GetBytes(3), q, cms, mysql.HasUnsignedFlag(hist.tp.Flag)) + err1 := decodeFeedback(row.GetBytes(3), q, cms, mysql.HasUnsignedFlag(hist.Tp.Flag)) if err1 != nil { log.Debugf("decode feedback failed, err: %v", errors.ErrorStack(err)) }