Out-of-Range and Overflow handling is not same with TiDB
Open
Nobody has claimed this yet.
affects-6.0
affects-6.1
component/compute
component/expression
severity/minor
type/bug
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
Minimal reproduce:
create table t(a int,b smallint unsigned);
alter table t add tiflash replica 1;
insert into t values(1,2);
select a-b from t; -- same with TiBD。ERROR 1690 (22003): BIGINT UNSIGNED value is out of range in xxx
select * from t where a-b; -- successfully . But TiBD raise ERROR 1690 (22003): BIGINT value is out of range in xxx
Cluster version:
Release Version: v4.0.0-beta.2-2332-gd1297376f-dirty
Edition: Community
Git Commit Hash: d1297376f1c9ab4835f3cfceec681ce4200aa428
Git Branch: master
UTC Build Time: 2021-03-10 12:30:39
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided CREATE, ALTER, INSERT, and SELECT statements on the reported TiFlash version and compare the results with TiDB, focusing on signed and unsigned subtraction in projection and predicate contexts. Done means both queries produce TiDB-compatible out-of-range errors with matching error types and messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100