pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/

Home Page:https://pingcap.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unstable test TestTruncateTableAndSchemaDependence

tangenta opened this issue · comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

https://do.pingcap.net/jenkins/blue/organizations/jenkins/pingcap%2Ftidb%2Fghpr_unit_test/detail/ghpr_unit_test/9438/pipeline

testkit.go:158: 
	Error Trace:	pkg/testkit/testkit.go:158
						pkg/testkit/testkit.go:151
						pkg/ddl/db_test.go:1103
						src/runtime/asm_amd64.s:1650
	Error:      	Received unexpected error:
						[schema:1049]Unknown database '(Schema ID 2)'
						github.com/pingcap/errors.AddStack
							external/com_github_pingcap_errors/errors.go:178
						github.com/pingcap/errors.Trace
							external/com_github_pingcap_errors/juju_adaptor.go:15
						github.com/pingcap/tidb/pkg/ddl.(*ddl).DoDDLJob
							pkg/ddl/ddl.go:1293
						github.com/pingcap/tidb/pkg/ddl.(*ddl).TruncateTable
							pkg/ddl/ddl_api.go:7135
						github.com/pingcap/tidb/pkg/executor.(*DDLExec).executeTruncateTable
							pkg/executor/ddl.go:244
						github.com/pingcap/tidb/pkg/executor.(*DDLExec).Next
							pkg/executor/ddl.go:191
						github.com/pingcap/tidb/pkg/executor/internal/exec.Next
							pkg/executor/internal/exec/executor.go:410
						github.com/pingcap/tidb/pkg/executor.(*ExecStmt).next
							pkg/executor/adapter.go:1211
						github.com/pingcap/tidb/pkg/executor.(*ExecStmt).handleNoDelayExecutor
							pkg/executor/adapter.go:960
						github.com/pingcap/tidb/pkg/executor.(*ExecStmt).handleNoDelay
							pkg/executor/adapter.go:794
						github.com/pingcap/tidb/pkg/executor.(*ExecStmt).Exec
							pkg/executor/adapter.go:559
						github.com/pingcap/tidb/pkg/session.runStmt
							pkg/session/session.go:2285
						github.com/pingcap/tidb/pkg/session.(*session).ExecuteStmt
							pkg/session/session.go:2146
						github.com/pingcap/tidb/pkg/testkit.(*TestKit).ExecWithContext
							pkg/testkit/testkit.go:384
						github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustExecWithContext
							pkg/testkit/testkit.go:156
						github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustExec
							pkg/testkit/testkit.go:151
						github.com/pingcap/tidb/pkg/ddl_test.TestTruncateTableAndSchemaDependence.func2
							pkg/ddl/db_test.go:1103
						runtime.goexit
							src/runtime/asm_amd64.s:1650
	Test:       	TestTruncateTableAndSchemaDependence
[2024/05/14 02:11:10.598 +00:00] [INFO] [callback.go:122] ["on job updated"] [category=ddl] [job="ID:105, Type:create table, State:synced, SchemaState:public, SchemaID:2, TableID:104, RowCount:0, ArgLen:0, start time: 2024-05-14 02:11:10.549 +0000 UTC, Err:<nil>, ErrCount:0, SnapshotVersion:0, LocalMode: false"]

[2024/05/14 02:11:10.599 +00:00] [INFO] [session.go:3959] ["CRUCIAL OPERATION"] [conn=7] [schemaVersion=52] [cur_db=] [sql="truncate table test.t"] [user=]

[2024/05/14 02:11:10.599 +00:00] [INFO] [session.go:3959] ["CRUCIAL OPERATION"] [conn=8] [schemaVersion=52] [cur_db=] [sql="drop database test"] [user=]

[2024/05/14 02:11:10.601 +00:00] [INFO] [ddl_worker.go:259] ["add DDL jobs"] [category=ddl] ["batch count"=1] [jobs="ID:107, Type:drop schema, State:queueing, SchemaState:public, SchemaID:2, TableID:0, RowCount:0, ArgLen:1, start time: 2024-05-14 02:11:10.6 +0000 UTC, Err:<nil>, ErrCount:0, SnapshotVersion:0, LocalMode: false; "] [table=true]

2. What did you expect to see? (Required)

No error

3. What did you see instead (Required)

Test failed

4. What is your TiDB version? (Required)

4b91fee