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

Incompatible with MySQL when using control functions with bit type #24725

Open
wshwsh12 opened this issue May 18, 2021 · 1 comment
Open

Incompatible with MySQL when using control functions with bit type #24725

wshwsh12 opened this issue May 18, 2021 · 1 comment
Labels
severity/moderate sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@wshwsh12
Copy link
Contributor

wshwsh12 commented May 18, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
drop table if exists b;
create table b(b bit(8));
insert into b values(97);
select if(1,b,'1') ='a' from b;
select if(1,b,'1') = 97 from b;

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

MySQL [test]> select if(1,b,'1') ='a' from b;
+------------------+
| if(1,b,'1') ='a' |
+------------------+
|                1 |
+------------------+
1 row in set (0.000 sec)

MySQL [test]> select if(1,b,'1') = 97 from b;
+------------------+
| if(1,b,'1') = 97 |
+------------------+
|                1 |
+------------------+
1 row in set (0.000 sec)

3. What did you see instead (Required)

[tidb]> select if(1,b,'1') ='a' from b;
+------------------+
| if(1,b,'1') ='a' |
+------------------+
|                1 |
+------------------+
1 row in set (0.001 sec)

[tidb]> select if(1,b,'1') = 97 from b;
+------------------+
| if(1,b,'1') = 97 |
+------------------+
|                0 |
+------------------+
1 row in set, 1 warning (0.001 sec)

4. What is your TiDB version? (Required)

master

@wshwsh12 wshwsh12 added the type/bug The issue is confirmed as a bug. label May 18, 2021
@wzru
Copy link
Contributor

wzru commented Jul 14, 2021

/assign @wzru

@wzru wzru removed their assignment Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants