From 1eff35b86bc79910f7facc53e4d26e8728eb9eea Mon Sep 17 00:00:00 2001 From: elsa0520 Date: Thu, 21 Dec 2023 17:14:41 +0800 Subject: [PATCH] This is an automated cherry-pick of #49630 --- statistics/column.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/statistics/column.go b/statistics/column.go index 6833615a8d73f..5d4040a79d69d 100644 --- a/statistics/column.go +++ b/statistics/column.go @@ -16,7 +16,6 @@ package statistics import ( "math" - "strconv" "github.com/pingcap/errors" "github.com/pingcap/tidb/parser/model" @@ -123,7 +122,9 @@ func (c *Column) IsInvalid(sctx sessionctx.Context, collPseudo bool) bool { if c.IsLoadNeeded() && stmtctx != nil { if stmtctx.StatsLoad.Timeout > 0 { logutil.BgLogger().Warn("Hist for column should already be loaded as sync but not found.", - zap.String(strconv.FormatInt(c.Info.ID, 10), c.Info.Name.O)) + zap.Int64("table_id", c.PhysicalID), + zap.Int64("column_id", c.Info.ID), + zap.String("column_name", c.Info.Name.O)) } // In some tests, the c.Info is not set, so we add this check here. if c.Info != nil {