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

planner: fix wrong TableDual plans caused by comparing Binary and Bytes incorrectly (#23860) #23918

Merged
merged 23 commits into from
Apr 16, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Apr 8, 2021

cherry-pick #23860 to release-5.0
You can switch your code base to this Pull Request by using git-extras:

# In tidb repo:
git pr https://github.com/pingcap/tidb/pull/23918

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/tidb.git pr/23918:release-5.0-af0982805940

What problem does this PR solve?

Issue Number: close #23846

Problem Summary: planner: fix wrong TableDual plans caused by comparing Binary and Bytes incorrectly

What is changed and how it works?

planner: fix wrong TableDual plans caused by comparing Binary and Bytes incorrectly

Check List

Tests

  • Unit test

Release note

  • planner: fix wrong TableDual plans caused by comparing Binary and Bytes incorrectly

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot requested review from a team as code owners April 8, 2021 03:18
@ti-srebot ti-srebot requested review from qw4990 and XuHuaiyu and removed request for a team April 8, 2021 03:18
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot added component/expression sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/5.0-cherry-pick type/bugfix This PR fixes a bug. labels Apr 8, 2021
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 8, 2021
@ti-srebot ti-srebot added this to the v5.0.0 ga milestone Apr 8, 2021
@ti-srebot
Copy link
Contributor Author

@qw4990 you're already a collaborator in bot's repo.

@wshwsh12 wshwsh12 removed their request for review April 9, 2021 07:20
@@ -3051,3 +3051,35 @@ func (s *testIntegrationSuite) TestIssue23736(c *C) {
// Should not use invisible index
c.Assert(tk.MustUseIndex("select /*+ stream_agg() */ count(1) from t0 where c > 10 and b < 2", "c"), IsFalse)
}
<<<<<<< HEAD
=======
Copy link
Contributor

Choose a reason for hiding this comment

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

@qw4990 please resolve conflicts.

@ti-chi-bot ti-chi-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 15, 2021
@eurekaka
Copy link
Contributor

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 15, 2021
@qw4990
Copy link
Contributor

qw4990 commented Apr 15, 2021

PTAL @time-and-fate @rebelice

@qw4990
Copy link
Contributor

qw4990 commented Apr 16, 2021

/run-all-tests

1 similar comment
@qw4990
Copy link
Contributor

qw4990 commented Apr 16, 2021

/run-all-tests

@time-and-fate
Copy link
Member

time-and-fate commented Apr 16, 2021

Seems we need to wait #24041 merged to get this PR pass TestIssue23846().

@zimulala
Copy link
Contributor

@qw4990
The test failed:

[2021-04-16T14:56:13.043Z] FAIL: integration_test.go:3137: testIntegrationSuite.TestIssue23846
[2021-04-16T14:56:13.043Z]
[2021-04-16T14:56:13.043Z] integration_test.go:3143:
[2021-04-16T14:56:13.043Z]     tk.MustQuery("select count(*) from t where a=0x00A4EEF4FA55D6706ED5").Check(testkit.Rows("1"))
[2021-04-16T14:56:13.043Z] /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:63:
[2021-04-16T14:56:13.043Z]     res.c.Assert(resBuff.String(), check.Equals, needBuff.String(), res.comment)
[2021-04-16T14:56:13.043Z] ... obtained string = "[0]\n"
[2021-04-16T14:56:13.043Z] ... expected string = "[1]\n"
[2021-04-16T14:56:13.043Z] ... sql:select count(*) from t where a=0x00A4EEF4FA55D6706ED5, args:[]

@time-and-fate
Copy link
Member

/run-all-tests

@zimulala
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@zimulala: /merge is only allowed for the committers in list.

In response to this:

/merge

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

@ti-srebot: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot merged commit 4141f83 into pingcap:release-5.0 Apr 16, 2021
@zhouqiang-cl zhouqiang-cl modified the milestones: v5.0.0 ga, v5.0.1 Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. component/expression sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/5.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants