-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
DOUBLE type can't keep precise #21692
Comments
Please edit this comment or add a new comment to complete the following informationNot a bug
Duplicate bug
BugNote: Make Sure that 'component', and 'severity' labels are added 1. Root Cause Analysis (RCA) (optional)2. Symptom (optional)3. All Trigger Conditions (optional)4. Workaround (optional)5. Affected versions6. Fixed versions |
/unlabel type/bug we didn't support |
/label type/bug since behaviour is not same with MySQL 8.0 (thought a deprecated feature), I still let this issue open |
I don't think this bug is fixed, here is the result in master( mysql> SELECT a, b, c, d FROM precise_types\G;
*************************** 1. row ***************************
a: 18446744073709551614
b: -9223372036854775806
c: 99999999999999999999.0
d: 1.8446744073709552e19
1 row in set (0.00 sec) got: |
|
This resolve issue pingcap#22791: query result for float type is incompatible with previous version It seems like this broke in the fix for issue pingcap#21692. In mysql, e-format is only returned when used in the query, for example: select 1e15, will print 1e15 back. However, when stored in a table mysel will print it in decimal form. issue pingcap#21692 resolved this by checking for empty table. However, that fix applies for everything rather than only for e-format. And that caused the new issue pingcap#22791. This resolves both pingcap#22791 and pingcap#21692. It also resolve an issue where for a default width float column we do not round to the mysql default precision.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
lightning's CI
2. What did you expect to see? (Required)
MySQL 8.0.19
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
Release Version: v4.0.0-beta.2-1804-g06cd92e05
Edition: Community
Git Commit Hash: 06cd92e
Git Branch: HEAD
UTC Build Time: 2020-12-12 21:09:27
GoVersion: go1.13.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
The text was updated successfully, but these errors were encountered: