-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
types: fix type merge about bit type #23857
Conversation
Signed-off-by: lzmhhh123 <lzmhhh123@gmail.com>
mysql> select a from t union select 10;
Field 1: `a`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: VAR_STRING
Collation: binary (63)
Length: 20
Max_length: 2
Decimals: 0
Flags: BINARY
+------+
| a |
+------+
| 10 |
| 1 |
| 2 |
+------+
3 rows in set (0.00 sec) |
IMHO, the result of bit merge int is int looks much more reasonable. It's also the same as MySQL 8.0. We'd better not keep all consistent as MySQL 5.7 brainlessly. |
/lgtm |
/lgtm |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 257ddaa
|
/run-all-tests |
/run-unit-test |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #24026 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.0 in PR #24027 |
Signed-off-by: lzmhhh123 lzmhhh123@gmail.com<!-- Thank you for contributing to TiDB!
PR Title Format:
-->
What problem does this PR solve?
Issue Number: close #23832
What is changed and how it works?
How it Works: make type merge infer for bit column compatible with MySQL 8.0
Related changes
Check List
Tests
Release note