-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/statisticsseverity/minorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
func TestDumpStatsDeltaBeforeHandleDDLEvent(t *testing.T) {
store, dom := testkit.CreateMockStoreAndDomain(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("create table t (c1 int)")
// Insert some data.
tk.MustExec("insert into t values (1), (2), (3)")
h := dom.StatsHandle()
require.NoError(t, h.DumpStatsDeltaToKV(true))
// Find the DDL event.
event := findEvent(h.DDLEventCh(), model.ActionCreateTable)
err := statstestutil.HandleDDLEventWithTxn(h, event)
require.NoError(t, err)
}
2. What did you expect to see? (Required)
It works well and we can tolerate the error.
3. What did you see instead (Required)
It bails out an error.
4. What is your TiDB version? (Required)
master
Metadata
Metadata
Assignees
Labels
affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/statisticsseverity/minorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.