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

function format incompatible with MySQL for round up #8796

Closed
eurekaka opened this issue Dec 25, 2018 · 0 comments
Closed

function format incompatible with MySQL for round up #8796

eurekaka opened this issue Dec 25, 2018 · 0 comments
Labels
component/expression help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/compatibility

Comments

@eurekaka
Copy link
Contributor

eurekaka commented Dec 25, 2018

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

In TiDB:

mysql> select format(1.123456, 4);
+---------------------+
| format(1.123456, 4) |
+---------------------+
| 1.1234              |
+---------------------+
1 row in set (0.00 sec)
  1. What did you expect to see?

In MySQL:

mysql> select format(1.123456, 4);
+---------------------+
| format(1.123456, 4) |
+---------------------+
| 1.1235              |
+---------------------+
1 row in set (0.00 sec)
  1. What did you see instead?

Different function result regarding round up.

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
mysql> select tidb_version();
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                                                    |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v2.1.0-rc.3-347-ga7907ed
Git Commit Hash: a7907ede7a9a740953b0c753b5b2b7add5b55195
Git Branch: master
UTC Build Time: 2018-12-24 11:14:34
GoVersion: go version go1.11.2 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/compatibility
Projects
None yet
Development

No branches or pull requests

1 participant