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

wrong results when CASE...WHEN function along with float argument #15291

Closed
SunRunAway opened this issue Mar 11, 2020 · 2 comments · Fixed by #15309
Closed

wrong results when CASE...WHEN function along with float argument #15291

SunRunAway opened this issue Mar 11, 2020 · 2 comments · Fixed by #15309
Assignees
Labels

Comments

@SunRunAway
Copy link
Contributor

SunRunAway commented Mar 11, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
  1. What did you expect to see?

W/ MySQL 5.7

mysql> select case when 0.1 then 1 else 2 end;
+---------------------------------+
| case when 0.1 then 1 else 2 end |
+---------------------------------+
|                               1 |
+---------------------------------+
1 row in set (0.00 sec)
  1. What did you see instead?

W/ TiDB,

mysql> select case when 0.1 then 1 else 2 end;
+---------------------------------+
| case when 0.1 then 1 else 2 end |
+---------------------------------+
|                               2 |
+---------------------------------+
1 row in set (0.00 sec)
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

b504d37

@SunRunAway
Copy link
Contributor Author

@lance6716
Would you like to take a look?

@lance6716
Copy link
Contributor

@lance6716
Would you like to take a look?

OK, since CASE function has a seperated issue, I'm going to let #15016 close #11601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants