Insert to a cached table larger than 64M does not report error
- 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
Assessment
This issue has not been assessed yet.