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

executor: fix the bug: can not join if join keys are type bigint and type bit (#19032) #19215

Merged
merged 6 commits into from
Sep 1, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #19032 to release-4.0


What problem does this PR solve?

Issue Number: close #11896

Problem Summary:

What is changed and how it works?

Proposal: xxx

What's Changed:

Only if integers have no unsigned flag and are negative, treat them as signed integers. Otherwise, just treat them as unsigned numbers so that the comparison between an integer and a bit set will be as expected.

How it Works:

tidb [test]> drop table if exists t;
Query OK, 0 rows affected (0.02 sec)

tidb [test]> drop table if exists t1;
Query OK, 0 rows affected (0.01 sec)

tidb [test]> create table t(c1 bigint);
Query OK, 0 rows affected (0.01 sec)

tidb [test]> create table t1(c1 bit(64));
Query OK, 0 rows affected (0.00 sec)

tidb [test]> insert into t value(1);
Query OK, 1 row affected (0.00 sec)

tidb [test]> insert into t1 value(1);
Query OK, 1 row affected (0.00 sec)

tidb [test]> select * from t, t1 where t.c1 = t1.c1;
+------+--------------------+
| c1   | c1                 |
+------+--------------------+
|    1 | 0x0000000000000001 |
+------+--------------------+
1 row in set (0.00 sec)

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Integration test
  • Manual test (add detailed scripts or steps below)

Release note

@ti-srebot
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 19, 2020
Copy link
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 19, 2020
@ti-srebot ti-srebot added status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Aug 19, 2020
@zz-jason
Copy link
Member

/merge

@ti-srebot
Copy link
Contributor Author

Sorry @zz-jason, you don't have permission to trigger auto merge event on this branch.
The version releasement is in progress.

@github-actions github-actions bot added the sig/execution SIG execution label Aug 20, 2020
@zz-jason
Copy link
Member

zz-jason commented Sep 1, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 1, 2020
@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 19445
  • 19518
  • 19452
  • 19439
  • 19465
  • 19628
  • 19611
  • 19577
  • 19559
  • 19614
  • 19546
  • 19049
  • 18997
  • 18696
  • 18760

@zz-jason
Copy link
Member

zz-jason commented Sep 1, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 18696
  • 18760
  • 19454
  • 18801
  • 19445
  • 19452
  • 19439
  • 19465
  • 19611
  • 19577
  • 19559
  • 19614
  • 19049
  • 18997
  • 18696
  • 18760

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

@zz-jason
Copy link
Member

zz-jason commented Sep 1, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 19611
  • 19577
  • 19559
  • 19614
  • 19049
  • 18997
  • 18696
  • 18760
  • 19454
  • 18801
  • 19445
  • 19452
  • 19465
  • 19601
  • 19611
  • 19577
  • 19559
  • 19614
  • 19049
  • 18997
  • 18696
  • 18760

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot merged commit bfdc09f into pingcap:release-4.0 Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/executor contribution This PR is from a community contributor. sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT3 The PR has already had 3 LGTM. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants