pingcap / pingcap/tidb

Runtime Error: index out of range

Open
#61,683 8 comments 0 reactions 1 assignee Claimed by @hawkingrei View on GitHub
affects-6.1 affects-6.5 affects-7.1 affects-7.5 affects-8.1 affects-8.5 fuzz/sqlancer impact/panic severity/major sig/execution type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

### 1. Minimal reproduce step (Required)

```sql
create table t0(c0 INT);
create view v1 as select exists( select 6 from t0 union select c_0 from t0 ) c_2 from ( select 0 c_0 ) subq_0;
create view v2 as select 7 c_1 from t0 where ( select c_2 from v1 );
create view v3 as select ( select c_2 from v1 ) c_3, ( select 7 from v2 ) c_4;
select c_4 from v3 where(c_4 = abs(c_3)); ERROR 1105 (HY000) at line 1: runtime error: index out of range [0] with length 0
```

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

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

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

`tiup playground nightly --host 0.0.0.0 --kv 3 --tiflash 3`
```bash
8.0.11-TiDB-v9.0.0-beta.1.pre-554-gb1a5536a64-dirty
```

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.