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

negative small decimal return unexcept result #6997

Closed
lysu opened this issue Jul 5, 2018 · 0 comments · Fixed by #7001
Closed

negative small decimal return unexcept result #6997

lysu opened this issue Jul 5, 2018 · 0 comments · Fixed by #7001
Assignees

Comments

@lysu
Copy link
Contributor

lysu commented Jul 5, 2018

this issue relates to #6985 but is not the only one question source.

  1. What did you do?
mysql> select -0.0000000000000000000000000000000000000000000000000017382578996420603;
  1. What did you expect to see?
Field   1:  `-0.0000000000000000000000000000000000000000000000000017382578996420603`
Catalog:    `def`
Database:   ``
Table:      ``
Org_table:  ``
Type:       NEWDECIMAL
Collation:  binary (63)
Length:     71
Max_length: 70
Decimals:   67
Flags:      NOT_NULL BINARY NUM 


+------------------------------------------------------------------------+
| -0.0000000000000000000000000000000000000000000000000017382578996420603 |
+------------------------------------------------------------------------+
| -0.0000000000000000000000000000000000000000000000000017382578996420603 |
+------------------------------------------------------------------------+

  1. What did you see instead?
Field   1:  `-0.0000000000000000000000000000000000000000000000000017382578996420603`
Catalog:    `def`
Database:   ``
Table:      ``
Org_table:  ``
Type:       NEWDECIMAL
Collation:  binary (63)
Length:     72
Max_length: 32
Decimals:   67
Flags:      BINARY NUM 


+------------------------------------------------------------------------+
| -0.0000000000000000000000000000000000000000000000000017382578996420603 |
+------------------------------------------------------------------------+
|                                       0.000000000000000000000000000000 |
+------------------------------------------------------------------------+

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
Release Version: v2.1.0-beta-11-g1f6e12cc5
Git Commit Hash: 1f6e12cc55e534bf514eef212f1091a91b8592c9
Git Branch: HEAD
UTC Build Time: 2018-07-04 06:31:26
GoVersion: go version go1.10.1 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant