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

Ambiguous warning when multiply result out of range #17993

Open
zhangysh1995 opened this issue Jun 12, 2020 · 10 comments
Open

Ambiguous warning when multiply result out of range #17993

zhangysh1995 opened this issue Jun 12, 2020 · 10 comments
Labels
challenge-program component/expression good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@zhangysh1995
Copy link

zhangysh1995 commented Jun 12, 2020

Description

Bug Report

It should return a clear error message regarding the original expression.

1. Minimal reproduce step (Required)

drop table if exists t5;
create table t5 (col0 CHAR(204), col1 VARBINARY(105), col2 TIMESTAMP, col3 TEXT, col4 FLOAT, col5 INT, col6 DOUBLE, col7 BIGINT, col8 BINARY(166), col9 DATETIME);
insert into t5 values ('73d6f787-e7d5-4238-97a2-fe789e18c2fd', '1101001', '1970-01-04 00:00:01', 'x', '86.5241691045369', '-0', '261.3998105809103', '-9223372036854775807', '100111', '1000-01-02 00:00:00');
create index dlzae on t5 (col7, col2);
SELECT col3 from t5 where t5.col7 * ABS(-9223372036854775807) ;

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

Clear error message about the out of range.

mysql> SELECT col3 from t5 where t5.col7 * ABS(-9223372036807) ;
ERROR 1690 (22003): BIGINT value is out of range in '(`test`.`t5`.`col7` * <cache>(abs(-(9223372036807))))'

3. What did you see instead (Required)

What is Column#0?

mysql> SELECT col3 from t5 where t5.col7 * ABS(-9223372036854775807) ;
ERROR 1690 (22003): BIGINT value is out of range in '(Column#0 * 9223372036854775807)'

4. Affected version (Required)

commit 4e74d40392e9b81f2a90cbc2f7777fd35f87b2e7 (HEAD -> master, origin/master, origin/HEAD)
Author: Arenatlx <ailinsilence4@gmail.com>
Date:   Fri Jun 12 16:58:00 2020 +0800

5. Root Cause Analysis

SIG slack channel

#sig-exec

Score

  • 300

Mentor

@zhangysh1995 zhangysh1995 added the type/bug The issue is confirmed as a bug. label Jun 12, 2020
@g1eny0ung
Copy link

/label component/expression

@qw4990 qw4990 added severity/moderate help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Aug 26, 2020
@yufan022
Copy link
Contributor

yufan022 commented Sep 3, 2020

/pick-up

@ti-challenge-bot
Copy link

It is not a pickable issue!

@zhangysh1995
Copy link
Author

@yufan022 I think you may propose a PR directly? The challenge program has finished. You will need to follow the contribution guidelines for TiDB.

@yufan022
Copy link
Contributor

/pick-up

@ti-challenge-bot
Copy link

Pick up success.

@yufan022
Copy link
Contributor

/give-up

@ti-challenge-bot ti-challenge-bot bot removed the picked label Sep 10, 2020
@ti-challenge-bot
Copy link

Give up success.

@yufan022
Copy link
Contributor

@yufan022 I think you may propose a PR directly? The challenge program has finished. You will need to follow the contribution guidelines for TiDB.

mockstore can't get column name, no good idea. maybe need discuss.

@XuHuaiyu
Copy link
Contributor

Error message or error code does not match MySQL

It should be considered as a minor bug.

@tisonkun tisonkun added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. and removed difficulty/easy labels Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
challenge-program component/expression good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

8 participants