Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#55842
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
hawkingrei authored and ti-chi-bot committed Sep 6, 2024
1 parent d00c55f commit 6b720cc
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/statistics/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,11 @@ func (coll *HistColl) GetScaledRealtimeAndModifyCnt(idxStats *Index) (realtimeCn
if analyzeRowCount <= 0 {
return coll.RealtimeCount, coll.ModifyCount
}
scale := idxStats.TotalRowCount() / analyzeRowCount
idxTotalRowCount := idxStats.TotalRowCount()
if idxTotalRowCount <= 0 {
return coll.RealtimeCount, coll.ModifyCount
}
scale := idxTotalRowCount / analyzeRowCount
return int64(float64(coll.RealtimeCount) * scale), int64(float64(coll.ModifyCount) * scale)
}

Expand Down

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions tests/integrationtest/t/planner/core/issuetest/planner_issue.test

Large diffs are not rendered by default.

0 comments on commit 6b720cc

Please sign in to comment.