Skip to content

Commit

Permalink
add partition table testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
Yisaer committed Jan 10, 2023
1 parent 5df51d5 commit 21f3009
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions executor/historical_stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,11 @@ PARTITION p0 VALUES LESS THAN (6)
tblID = hsWorker.GetOneHistoricalStatsTable()
require.NotEqual(t, tblID, -1)
err = hsWorker.DumpHistoricalStats(tblID, h)
require.NoError(t, err)
tblID = hsWorker.GetOneHistoricalStatsTable()
require.NotEqual(t, tblID, -1)
err = hsWorker.DumpHistoricalStats(tblID, h)
require.NoError(t, err)
time.Sleep(1 * time.Second)
snapshot = oracle.GoTimeToTS(time.Now())
jsTable, err = h.DumpHistoricalStatsBySnapshot("test", tbl.Meta(), snapshot)
Expand Down
4 changes: 3 additions & 1 deletion statistics/handle/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ func (h *Handle) DumpHistoricalStatsBySnapshot(dbName string, tableInfo *model.T
if isDynamicMode {
tbl, err := h.tableHistoricalStatsToJSON(tableInfo.ID, snapshot)
if err != nil {
logutil.BgLogger().Warn("dump global historical stats failed", zap.Int64("table-id", tableInfo.ID))
logutil.BgLogger().Warn("dump global historical stats failed",
zap.Int64("table-id", tableInfo.ID),
zap.String("table-name", tableInfo.Name.String()))
} else if tbl != nil {
jsonTbl.Partitions["global"] = tbl
}
Expand Down

0 comments on commit 21f3009

Please sign in to comment.