mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
10065404ea
The bug happens when one uses MAX_ROWS=# with Aria & row_format=page and one insert more than # rows. mysql-test/mysql-test-run.pl: Ignore table is full error messages mysql-test/suite/maria/r/max_length.result: Test case for 'Table is full' mysql-test/suite/maria/t/max_length.test: Test case for 'Table is full' storage/maria/ma_bitmap.c: Ensure that we don't allocate bits outside of max_data_file_size. Adjust max_data_file_size based on bitmap alignments. Backport fix to adjust wrong first_bitmap_with_space. storage/maria/ma_blockrec.c: Calculate value of max_data_file_length storage/maria/ma_blockrec.h: Updated prototype for _ma_bitmap_init() storage/maria/ma_check.c: Give warnings if file sizes are above max file sizes. Give more warnings in case of errors. Have maria_chk write if table is recreated. storage/maria/ma_create.c: Better calculation of max_data_file_length and thus data pointer length. Fixes some wrong pointer lengths when using MAX_ROWS=# storage/maria/ma_open.c: Removed duplicate assigment. Use block size from file instead of global variable. storage/maria/maria_chk.c: Remove -1 from printed file length storage/maria/maria_def.h: Update struct st_maria_file_bitmap
52 lines
2 KiB
Text
52 lines
2 KiB
Text
# Test max data length
|
|
# This test will use around 1.3G of disk space!
|
|
|
|
--source include/have_maria.inc
|
|
--source include/big_test.inc
|
|
|
|
drop table if exists t1,t2;
|
|
|
|
create table t1 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=2 engine=aria;
|
|
create table t2 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=20000000 engine=aria;
|
|
lock tables t1 write,t2 write;
|
|
--replace_column 12 # 13 # 14 #
|
|
show table status like "t_";
|
|
insert into t1 values(null, repeat("ab",100),repeat("def",1000));
|
|
insert into t1 values(null, repeat("de",200),repeat("ghi",2000));
|
|
insert into t1 values(null, repeat("fe",300),repeat("ghi",3000));
|
|
insert into t1 values(null, repeat("gh",400),repeat("jkl",10000));
|
|
insert into t1 (v,b) select v,b from t2;
|
|
insert into t2 (v,b) select v,b from t1;
|
|
insert into t1 (v,b) select v,b from t2;
|
|
insert into t2 (v,b) select v,b from t1;
|
|
insert into t1 (v,b) select v,b from t2;
|
|
insert into t2 (v,b) select v,b from t1;
|
|
insert into t1 (v,b) select v,b from t2;
|
|
insert into t2 (v,b) select v,b from t1;
|
|
insert into t1 (v,b) select v,b from t2;
|
|
insert into t2 (v,b) select v,b from t1;
|
|
insert into t1 (v,b) select v,b from t2;
|
|
insert into t2 (v,b) select v,b from t1;
|
|
insert into t1 (v,b) select v,b from t2;
|
|
insert into t2 (v,b) select v,b from t1;
|
|
insert into t1 (v,b) select v,b from t2;
|
|
insert into t2 (v,b) select v,b from t1;
|
|
insert into t1 (v,b) select v,b from t2;
|
|
insert into t2 (v,b) select v,b from t1;
|
|
insert into t1 (v,b) select v,b from t2;
|
|
insert into t2 (v,b) select v,b from t1;
|
|
unlock tables;
|
|
|
|
--error ER_RECORD_FILE_FULL
|
|
insert into t1 (v,b) select v,b from t2;
|
|
check table t1;
|
|
--error ER_RECORD_FILE_FULL
|
|
insert into t1 values(null, repeat("gh",400),repeat("jkl",10000));
|
|
check table t1;
|
|
# Test also with inserting into empty table (different code)
|
|
truncate table t1;
|
|
--error ER_RECORD_FILE_FULL
|
|
insert into t1 (v,b) select v,b from t2;
|
|
check table t1;
|
|
|
|
drop table t1,t2;
|