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

BIGINT value is out of range #26551

Closed
ChenPeng2013 opened this issue Jul 26, 2021 · 2 comments · Fixed by #26894
Closed

BIGINT value is out of range #26551

ChenPeng2013 opened this issue Jul 26, 2021 · 2 comments · Fixed by #26894
Assignees
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@ChenPeng2013
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
drop table if exists PK_HP9236;
CREATE TABLE `PK_HP9236` (
  `COL1` int NOT NULL DEFAULT '25' COMMENT 'NUMERIC PK',
  `COL2` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL,
  `COL4` datetime DEFAULT NULL,
  `COL3` bigint NOT NULL,
  `COL5` float DEFAULT NULL,
  PRIMARY KEY (`COL1`,`COL3`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
/*!50100 PARTITION BY HASH ((`COL1` * `COL3`))
PARTITIONS 13;
select * from PK_HP9236 where col3 in (-163702007293870918, 2659937067964964513, 2322376022806085210) and col1 = 783367513002;

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

mysql> select * from PK_HP9236 where col3 in (-163702007293870918, 2659937067964964513, 2322376022806085210) and col1 = 783367513002;
Empty set (0.00 sec)

3. What did you see instead (Required)

mysql> select * from PK_HP9236 where col3 in (-163702007293870918, 2659937067964964513, 2322376022806085210) and col1 = 783367513002;
ERROR 1690 (22003): BIGINT value is out of range in '(test.pk_hp9236.col1 * test.pk_hp9236.col3)'

4. What is your TiDB version? (Required)

It can be reproduced on branch release-5.0、release-5.1、master
Release-4.0 doesn't exist the issue。

Release Version: v5.1.0-64-gfb0eaf7b4
Edition: Community
Git Commit Hash: fb0eaf7b44b9ddb1494bf8194d8e361c538146dc
Git Branch: release-5.1
UTC Build Time: 2021-07-26 06:50:38
GoVersion: go1.16.5
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@ChenPeng2013 ChenPeng2013 added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner severity/major labels Jul 26, 2021
@Reminiscent
Copy link
Contributor

/assign

@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

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

Successfully merging a pull request may close this issue.

3 participants