Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: add test for issue #54254 and it has been fixed by pr #54183 (#54301) #57475

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #54301

What problem does this PR solve?

Issue Number: close #54254 #48457

Problem Summary: add test for issue #54254 and it has been fixed by pr #54183

What changed and how does it work?

PR #54183 also fix the issue #54254, and I've verified and add a test TestIssue54254 for it.

Without the fix in PR #54183, the test TestIssue54254 will failed and has the same panic stack, such as following:

[2024/06/28 14:06:22.604 +08:00] [ERROR] [conn.go:1024] ["connection running loop panic"] [conn=2097158] [session_alias=] [lastSQL="UPDATE stock SET c = ? WHERE a= ? AND b = 'a' [arguments: (101, 1)]"] [err="runtime error: index out of range [4] with length 4"] [stack="github.com/pingcap/tidb/pkg/server.(*clientConn).Run.func1
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/conn.go:1027
runtime.gopanic
	/usr/local/go/src/runtime/panic.go:914
github.com/pingcap/tidb/pkg/executor.(*Compiler).Compile.func1
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/executor/compiler.go:57
runtime.gopanic
	/usr/local/go/src/runtime/panic.go:914
runtime.goPanicIndex
	/usr/local/go/src/runtime/panic.go:114
github.com/pingcap/tidb/pkg/planner/core.GetUpdateColumnsInfo
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/core/logical_plan_builder.go:5855
github.com/pingcap/tidb/pkg/planner/core.(*Update).buildTbl2UpdateColumns
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/core/foreign_key.go:336
github.com/pingcap/tidb/pkg/planner/core.(*Update).buildOnUpdateFKTriggers
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/core/foreign_key.go:224
github.com/pingcap/tidb/pkg/planner/core.buildPointUpdatePlan
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/core/point_get_plan.go:1970
github.com/pingcap/tidb/pkg/planner/core.tryUpdatePointPlan
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/core/point_get_plan.go:1910
github.com/pingcap/tidb/pkg/planner/core.TryFastPlan
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/core/point_get_plan.go:923
github.com/pingcap/tidb/pkg/planner.Optimize
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/optimize.go:224
github.com/pingcap/tidb/pkg/planner/core.generateNewPlan
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/core/plan_cache.go:316
github.com/pingcap/tidb/pkg/planner/core.GetPlanFromPlanCache
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/core/plan_cache.go:265
github.com/pingcap/tidb/pkg/planner.OptimizeExecStmt
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/optimize.go:541
github.com/pingcap/tidb/pkg/planner.Optimize
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/planner/optimize.go:163
github.com/pingcap/tidb/pkg/executor.(*Compiler).Compile
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/executor/compiler.go:99
github.com/pingcap/tidb/pkg/session.(*session).ExecuteStmt
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/session/session.go:2098
github.com/pingcap/tidb/pkg/server.(*TiDBContext).ExecuteStmt
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/driver_tidb.go:294
github.com/pingcap/tidb/pkg/server.(*clientConn).executePreparedStmtAndWriteResult
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/conn_stmt.go:306
github.com/pingcap/tidb/pkg/server.(*clientConn).executePlanCacheStmt
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/conn_stmt.go:234
github.com/pingcap/tidb/pkg/server.(*clientConn).handleStmtExecute
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/conn_stmt.go:225
github.com/pingcap/tidb/pkg/server.(*clientConn).dispatch
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/conn.go:1386
github.com/pingcap/tidb/pkg/server.(*clientConn).Run
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/conn.go:1125
github.com/pingcap/tidb/pkg/server.(*Server).onConn
	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/server.go:739"] 
...
...
...
--- FAIL: TestIssue54254 (0.54s)
    server_client.go:2966: 
        	Error Trace:	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/internal/testserverclient/server_client.go:2966
        	            				/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/ddl/util/callback/callback.go:124
        	            				/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/ddl/job_table.go:634
        	            				/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/ddl/job_table.go:538
        	            				/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/util/wait_group_wrapper.go:171
        	            				/usr/local/go/src/runtime/asm_arm64.s:1197
        	Error:      	Received unexpected error:
        	            	Error 1105 (HY000): runtime error: index out of range [4] with length 4
        	Test:       	TestIssue54254
    server_client.go:865: 
        	Error Trace:	/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/internal/testserverclient/server_client.go:865
        	            				/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/internal/testserverclient/server_client.go:2991
        	            				/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/internal/testserverclient/server_client.go:2890
        	            				/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/internal/testserverclient/server_client.go:134
        	            				/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/internal/testserverclient/server_client.go:2862
        	            				/Users/cs/code/goread/src/github.com/pingcap/tidb/pkg/server/tests/commontest/tidb_test.go:3099
        	Error:      	Not equal: 
        	            	expected: "1 a 101 x <nil>\n2 b 102 z <nil>"
        	            	actual  : "1 a 11 x <nil>\n2 b 22 y <nil>"

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: crazycs520 <crazycs520@gmail.com>
@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Nov 18, 2024
Copy link

ti-chi-bot bot commented Nov 18, 2024

@ti-chi-bot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/build edd5432 link true /test build
idc-jenkins-ci-tidb/unit-test edd5432 link true /test unit-test

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release-8.5@08ed793). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.5     #57475   +/-   ##
================================================
  Coverage               ?   37.0533%           
================================================
  Files                  ?       1676           
  Lines                  ?     609829           
  Branches               ?          0           
================================================
  Hits                   ?     225962           
  Misses                 ?     361849           
  Partials               ?      22018           
Flag Coverage Δ
integration 37.0533% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling ∅ <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 23.3651% <0.0000%> (?)

@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Nov 19, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 19, 2024
@lance6716
Copy link
Contributor

@crazycs520 function signature mismatch

Copy link
Collaborator

@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

ti-chi-bot bot commented Nov 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benjamin2037, lance6716

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Benjamin2037,lance6716]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 20, 2024
Copy link

ti-chi-bot bot commented Nov 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-19 08:12:45.229656943 +0000 UTC m=+948727.420525954: ☑️ agreed by lance6716.
  • 2024-11-20 06:21:49.672641191 +0000 UTC m=+12697.292295707: ☑️ agreed by Benjamin2037.

@ti-chi-bot ti-chi-bot bot removed the cherry-pick-approved Cherry pick PR approved by release team. label Nov 20, 2024
@ti-chi-bot ti-chi-bot closed this Nov 20, 2024
@ti-chi-bot ti-chi-bot bot added do-not-merge/cherry-pick-not-approved cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved cherry-pick-approved Cherry pick PR approved by release team. labels Nov 20, 2024
@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants