pingcap / pingcap/tidb

Unexpected Error Overflow

Open
#47,348 1 comment 0 reactions 0 assignees View on GitHub
fuzz/sqlancer severity/moderate sig/execution type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

```sql
CREATE TABLE t0(c0 TEXT(300));
INSERT t0(c0) VALUES(-2E300);

SELECT t0.c0 FROM t0 WHERE CAST(- t0.c0 AS DECIMAL); -- ERROR 1105 (HY000): [components/tidb_query_datatype/src/codec/mysql/decimal.rs:1893]: parsing 2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 will overflow
```

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

### 3. What did you see instead (Required)

### 4. What is your TiDB version? (Required)

```bash
| Release Version: v7.4.0-alpha
Edition: Community
Git Commit Hash: 32540a4a77984744dc0309d9287b05c8e9593252
Git Branch: heads/refs/tags/v7.4.0-alpha
UTC Build Time: 2023-09-27 14:33:24
GoVersion: go1.21.1
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.