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

select cast(111 as decimal(1)) is not consistent with MySQL #3340

Closed
XuHuaiyu opened this issue May 25, 2017 · 0 comments · Fixed by #3358
Closed

select cast(111 as decimal(1)) is not consistent with MySQL #3340

XuHuaiyu opened this issue May 25, 2017 · 0 comments · Fixed by #3358
Assignees
Labels
type/bug The issue is confirmed as a bug.

Comments

@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented May 25, 2017

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
select cast(111 as decimal(1));
  1. What did you expect to see?
mysql> select cast(111 as decimal(2));
+-------------------------+
| cast(111 as decimal(1)) |
+-------------------------+
|                      9 |
+-------------------------+
1 row in set, 1 warning (0.00 sec)
  1. What did you see instead?
mysql> select cast(111 as decimal(1));
+-------------------------+
| cast(111 as decimal(1)) |
+-------------------------+
|                     111 |
+-------------------------+
1 row in set (0.00 sec)
  1. What version of TiDB are you using (tidb-server -V)?
Git Commit Hash: 2198d0e7521a5c6c493a4c7af58509b6b277fd6e
UTC Build Time:  2017-05-23 03:07:15
@XuHuaiyu XuHuaiyu added the type/bug The issue is confirmed as a bug. label May 27, 2017
@XuHuaiyu XuHuaiyu self-assigned this May 27, 2017
@XuHuaiyu XuHuaiyu mentioned this issue May 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant