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 big_unsigned_int union decimal differ from mysql #7200

Closed
XuHuaiyu opened this issue Jul 31, 2018 · 1 comment · Fixed by #7202
Closed

select big_unsigned_int union decimal differ from mysql #7200

XuHuaiyu opened this issue Jul 31, 2018 · 1 comment · Fixed by #7202
Assignees
Labels
type/bug The issue is confirmed as a bug.

Comments

@XuHuaiyu
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

db.txt

result of TiDB

tidb>  select `col_bigint_unsigned_key` from table90_int_autoinc union select  `col_decimal_10_4_signed_key` from `table90_int_autoinc` order by col_bigint_unsigned_key;
+-------------------------+
| col_bigint_unsigned_key |
+-------------------------+
|                    NULL |
|                  0.0000 |
|                  0.1123 |
|                  1.0000 |
|                  1.0090 |
|                  1.0988 |
|                 12.9873 |
|                 12.9910 |
|                 13.0000 |
|                 27.0000 |
|                 74.0000 |
|                 82.0000 |
|                 90.0000 |
|                 93.0000 |
|                981.0000 |
|               1235.0000 |
|               2909.0000 |
|              13982.0000 |
|              32259.0000 |
+-------------------------+
19 rows in set (0.00 sec)

result of MySQL:

mysql> select `col_bigint_unsigned_key` from table90_int_autoinc union select  `col_decimal_10_4_signed_key` from `table90_int_autoinc` order by col_bigint_unsigned_key;
+-------------------------+
| col_bigint_unsigned_key |
+-------------------------+
|                    NULL |
|             -27110.0000 |
|             -20764.0000 |
|               -111.1212 |
|                -83.0000 |
|                 -9.1823 |
|                 -1.0000 |
|                 -0.9871 |
|                  0.0000 |
|                  0.1123 |
|                  1.0000 |
|                  1.0090 |
|                  1.0988 |
|                 12.9873 |
|                 12.9910 |
|                 13.0000 |
|                 27.0000 |
|                 74.0000 |
|                 82.0000 |
|                 90.0000 |
|                 93.0000 |
|                981.0000 |
|               1235.0000 |
|               2909.0000 |
|              13982.0000 |
|              32259.0000 |
+-------------------------+
26 rows in set (0.00 sec)

tidb_version:
tidb> select tidb_version();

+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                       |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v2.1.0-beta-133-gd2aab148
Git Commit Hash: d2aab148fccb792b40f824f603dea3e7ba245d67
Git Branch: master
UTC Build Time: 2018-07-31 03:15:42
GoVersion: go version go1.10.3 darwin/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@XuHuaiyu XuHuaiyu added the type/bug The issue is confirmed as a bug. label Jul 31, 2018
@XuHuaiyu
Copy link
Contributor Author

@lysu PTAL

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.

2 participants