pingcap / pingcap/tidb

Insert to a cached table larger than 64M does not report error

Open
#47,619 0 comments 0 reactions 1 assignee Claimed by @tiancaiamao View on GitHub
affects-6.0 affects-6.1 affects-6.2 affects-6.3 affects-6.4 affects-6.5 affects-6.6 affects-7.0 affects-7.1 affects-7.2 affects-7.3 affects-7.4 severity/moderate sig/sql-infra 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)

There is a size limitation for cached table, and when a cached table is too large, insert to it should report error.

```
# TestInsertTableTooLargeErr
drop table if exists t,t2;
# -- create a table first to provide the data
create table t (pad varchar(200));
insert into t values (repeat('x', 200));
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
# -- create a cached table
create table t2 like t;
alter table t2 cache;
# -- fill data and check the error
insert into t2 select * from t;
insert into t2 select * from t;
insert into t2 select * from t;
insert into t2 select * from t;
--error table too large
insert into t2 select * from t;
```

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

It's expected to get an error when the cached table t2 is big enough:

```
--error table too large
insert into t2 select * from t;
```

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

No error ...

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

master f4b287db7f0c6890e381764151a07ecf08c362d7

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.