| 1 |
# Test max data length |
| 2 |
# This test will use around 1.3G of disk space! |
| 3 |
|
| 4 |
--source include/have_maria.inc |
| 5 |
--source include/have_sequence.inc |
| 6 |
--source include/big_test.inc |
| 7 |
# This test is too slow for valgrind |
| 8 |
--source include/not_valgrind.inc |
| 9 |
--source include/not_msan_with_debug.inc |
| 10 |
|
| 11 |
drop table if exists t1,t2; |
| 12 |
|
| 13 |
create table t1 (id int(10) unsigned not null auto_increment primary key, v varchar(2000), b blob) row_format=page max_rows=2 engine=aria; |
| 14 |
create table t2 (id int(10) unsigned not null auto_increment primary key, v varchar(2000), b blob, key(v)) row_format=page max_rows=20000000 engine=aria; |
| 15 |
show create table t1; |
| 16 |
show create table t2; |
| 17 |
lock tables t1 write,t2 write; |
| 18 |
--replace_column 12 # 13 # 14 # |
| 19 |
show table status like "t_"; |
| 20 |
insert into t1 values(null, repeat("ab",100),repeat("def",1000)); |
| 21 |
insert into t1 values(null, repeat("de",200),repeat("ghi",2000)); |
| 22 |
insert into t1 values(null, repeat("fe",300),repeat("ghi",3000)); |
| 23 |
insert into t1 values(null, repeat("gh",400),repeat("jkl",10000)); |
| 24 |
insert into t1 (v,b) select v,b from t2; |
| 25 |
insert into t2 (v,b) select v,b from t1; |
| 26 |
insert into t1 (v,b) select v,b from t2; |
| 27 |
insert into t2 (v,b) select v,b from t1; |
| 28 |
insert into t1 (v,b) select v,b from t2; |
| 29 |
insert into t2 (v,b) select v,b from t1; |
| 30 |
insert into t1 (v,b) select v,b from t2; |
| 31 |
insert into t2 (v,b) select v,b from t1; |
| 32 |
insert into t1 (v,b) select v,b from t2; |
| 33 |
insert into t2 (v,b) select v,b from t1; |
| 34 |
insert into t1 (v,b) select v,b from t2; |
| 35 |
insert into t2 (v,b) select v,b from t1; |
| 36 |
insert into t1 (v,b) select v,b from t2; |
| 37 |
insert into t2 (v,b) select v,b from t1; |
| 38 |
insert into t1 (v,b) select v,b from t2; |
| 39 |
insert into t2 (v,b) select v,b from t1; |
| 40 |
insert into t1 (v,b) select v,b from t2; |
| 41 |
insert into t2 (v,b) select v,b from t1; |
| 42 |
insert into t1 (v,b) select v,b from t2; |
| 43 |
insert into t2 (v,b) select v,b from t1; |
| 44 |
unlock tables; |
| 45 |
|
| 46 |
--error ER_RECORD_FILE_FULL |
| 47 |
insert into t1 (v,b) select v,b from t2; |
| 48 |
check table t1; |
| 49 |
--error ER_RECORD_FILE_FULL |
| 50 |
insert into t1 values(null, repeat("gh",400),repeat("jkl",10000)); |
| 51 |
check table t1; |
| 52 |
# Test also with inserting into empty table (different code) |
| 53 |
truncate table t1; |
| 54 |
--error ER_RECORD_FILE_FULL |
| 55 |
insert into t1 (v,b) select v,b from t2; |
| 56 |
check table t1; |
| 57 |
|
| 58 |
drop table t1,t2; |
| 59 |
|
| 60 |
# |
| 61 |
# Check that we don't get table-is-full |
| 62 |
# |
| 63 |
|
| 64 |
create table t1 ( |
| 65 |
c1 int unsigned, |
| 66 |
c2 char(80) |
| 67 |
) Engine=ARIA ROW_FORMAT=FIXED min_rows=1000000; |
| 68 |
show create table t1; |
| 69 |
insert into t1 select seq,seq from seq_1_to_100000; |
| 70 |
|
| 71 |
create or replace table t1 ( |
| 72 |
c1 int unsigned, |
| 73 |
c2 char(80) |
| 74 |
) Engine=ARIA ROW_FORMAT=FIXED; |
| 75 |
show create table t1; |
| 76 |
insert into t1 select seq,seq from seq_1_to_100000; |
| 77 |
|
| 78 |
create or replace table t1 ( |
| 79 |
c1 int unsigned, |
| 80 |
c2 char(80) |
| 81 |
) Engine=ARIA ROW_FORMAT=PAGE TRANSACTIONAL=0; |
| 82 |
show create table t1; |
| 83 |
insert into t1 select seq,seq from seq_1_to_100000; |
| 84 |
|
| 85 |
# |
| 86 |
# For these we should get table is full error |
| 87 |
# |
| 88 |
|
| 89 |
create or replace table t1 ( |
| 90 |
c1 int unsigned, |
| 91 |
c2 char(80) |
| 92 |
) Engine=ARIA ROW_FORMAT=FIXED MAX_ROWS=10; |
| 93 |
show create table t1; |
| 94 |
--error ER_RECORD_FILE_FULL |
| 95 |
insert into t1 select seq,seq from seq_1_to_100000; |
| 96 |
select count(*) from t1; |
| 97 |
|
| 98 |
create or replace table t1 ( |
| 99 |
c1 int unsigned, |
| 100 |
c2 char(80) |
| 101 |
) Engine=ARIA ROW_FORMAT=DYNAMIC MAX_ROWS=10; |
| 102 |
show create table t1; |
| 103 |
--error ER_RECORD_FILE_FULL |
| 104 |
insert into t1 select seq,seq from seq_1_to_100000; |
| 105 |
select count(*) from t1; |
| 106 |
check table t1; |
| 107 |
|
| 108 |
# PAGE uses 3 byte pointers as minimum, which can handle up to 200M files |
| 109 |
|
| 110 |
create or replace table t1 ( |
| 111 |
c1 int unsigned, |
| 112 |
c2 char(80) |
| 113 |
) Engine=ARIA ROW_FORMAT=PAGE MAX_ROWS=10; |
| 114 |
show create table t1; |
| 115 |
insert into t1 select seq,seq from seq_1_to_100000; |
| 116 |
select count(*) from t1; |
| 117 |
check table t1; |
| 118 |
drop table t1; |
| 119 |
|
| 120 |
create or replace table t1 ( |
| 121 |
c1 int unsigned, |
| 122 |
c2 char(80) |
| 123 |
) Engine=ARIA ROW_FORMAT=PAGE MAX_ROWS=10; |
| 124 |
show create table t1; |
| 125 |
--error ER_RECORD_FILE_FULL |
| 126 |
insert into t1 select seq,seq from seq_1_to_10000000; |
| 127 |
select count(*) from t1; |
| 128 |
check table t1; |
| 129 |
--replace_column 12 # 13 # 14 # |
| 130 |
show table status like "t1"; |
| 131 |
create index seq on t1(c1); |
| 132 |
--replace_column 12 # 13 # 14 # |
| 133 |
show table status like "t1"; |
| 134 |
drop table t1; |