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 9223372036854775807 + 1; is not compatible with MySQL #9823

Closed
wjhuang2016 opened this issue Mar 20, 2019 · 3 comments
Closed

SELECT 9223372036854775807 + 1; is not compatible with MySQL #9823

wjhuang2016 opened this issue Mar 20, 2019 · 3 comments

Comments

@wjhuang2016
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    SELECT 9223372036854775807 + 1;

  2. What did you expect to see?
    In Mysql 8.0.15

mysql> SELECT 9223372036854775807+1;
ERROR 1690 (22003): BIGINT value is out of range in '(9223372036854775807 + 1)'

See also https://dev.mysql.com/doc/refman/8.0/en/out-of-range-and-overflow.html

  1. What did you see instead?
mysql> SELECT 9223372036854775807+1;
+-----------------------+
| 9223372036854775807+1 |
+-----------------------+
|   9223372036854775808 |
+-----------------------+
1 row in set (0.00 sec)
  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: v3.0.0-beta-231-g20463d6-dirty
Git Commit Hash: 20463d6da90fdf12c0d9d18c15dc33a78334882d
Git Branch: master
UTC Build Time: 2019-03-20 02:03:04
GoVersion: go version go1.12 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
@eurekaka
Copy link
Contributor

@wjhuang2016 thanks for the report, do you have interest to fix this :) ?

@wjhuang2016
Copy link
Member Author

@wjhuang2016 thanks for the report, do you have interest to fix this :) ?

I try to. It may take a few days, and I am working on #9804. They may have some connection.

@eurekaka
Copy link
Contributor

@wjhuang2016 that will be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants