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

Error msg not same in unistore and TiKV #47692

Open
Defined2014 opened this issue Oct 17, 2023 · 1 comment
Open

Error msg not same in unistore and TiKV #47692

Defined2014 opened this issue Oct 17, 2023 · 1 comment
Labels
severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@Defined2014
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

drop table if exists tb5;
create table tb5(a double, b float);
insert into tb5 (a, b) values (184467440737095516160, 184467440737095516160);
select * from tb5 where cast(a as unsigned int)=0;
show warnings;

2. What did you expect to see? (Required)

Result same

3. What did you see instead (Required)

Not same

Unistore

mysql> show warnings;
+---------+------+-------------------------------------------------+
| Level   | Code | Message                                         |
+---------+------+-------------------------------------------------+
| Warning | 1690 | constant 1.844674407370955e+20 overflows bigint |
+---------+------+-------------------------------------------------+
1 row in set (0.00 sec)

TiKV

mysql> show warnings;
+---------+------+----------------------------------------------------------------------+
| Level   | Code | Message                                                              |
+---------+------+----------------------------------------------------------------------+
| Warning | 1690 | evaluation failed: constant 184467440737095500000 overflows LongLong |
+---------+------+----------------------------------------------------------------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

mysql> SELECT tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                             |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v7.5.0-alpha
Edition: Community
Git Commit Hash: 4765838f4dc093bb2b2a16b0fd20a73e397532c6
Git Branch: heads/refs/tags/v7.5.0-alpha
UTC Build Time: 2023-10-16 14:25:07
GoVersion: go1.21.3
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@Defined2014 Defined2014 added type/bug The issue is confirmed as a bug. sig/execution SIG execution labels Oct 17, 2023
@Defined2014 Defined2014 changed the title warnings msg not same in unistore and tikv Overflow warnings msg not same in unistore and tikv Oct 17, 2023
@Defined2014 Defined2014 changed the title Overflow warnings msg not same in unistore and tikv Overflow warnings msg not same in unistore and TiKV Oct 17, 2023
@Defined2014 Defined2014 changed the title Overflow warnings msg not same in unistore and TiKV Error msg not same in unistore and TiKV Oct 17, 2023
@Defined2014
Copy link
Contributor Author

Defined2014 commented Oct 17, 2023

Another case

 create table tb5(a int(10));
 insert into tb5 (a) values (10);
 select * from tb5 where a - -9223372036854775808;
-Error 1690 (22003): BIGINT value is out of range in '(Column#0 - -9223372036854775808)'
+Error 1690 (22003): BIGINT value is out of range in '(10 - -9223372036854775808)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants