mariadb/mysql-test/suite/maria/max_length.test
Daniel Black 676aea8cad MDEV-36848: identify tests with various MSAN suitability
With MSAN the following test behavious where observed:
* funcs_1.myisam_views-big - normal big test for non-debug
* innodb_gis.rtree_purge - normal big test with MSAN
* main.alter_table_lock - very quick - unclear why disabled
* main.cte_recursive - slow on Debug only
* main.join_cache_notasan - special MSAN handing for returning OOM added
* main.sum_distinct-big - 90 seconds on non-debug - still big however
* maria.max_length - normal big test with MSAN
* perfschema.statement_digest_long_query - overflows stack on debug

Timingsi (on old memory constrained hardware):

non-debug:

funcs_1.myisam_views-big                 w2 [ pass ]  78564
innodb_gis.rtree_purge '16k'             w2 [ pass ]   5784
innodb_gis.rtree_purge '32k'             w2 [ pass ]   5242
innodb_gis.rtree_purge '4k'              w1 [ pass ]   8303
innodb_gis.rtree_purge '64k'             w1 [ pass ]   6348
innodb_gis.rtree_purge '8k'              w2 [ pass ]   5870
main.alter_table_lock                    w1 [ pass ]     41
main.cte_recursive                       w1 [ pass ]  15485
main.join_cache_notasan                  w1 [ pass ]     39
main.sum_distinct-big                    w2 [ pass ]  96256
maria.max_length                         w1 [ pass ]  92990
perfschema.statement_digest_long_query   w2 [ pass ]      8

debug:

funcs_1.myisam_views-big                 w1 [ skipped ]  Can't be run WITH_MSAN and CMAKE_BUILD_TYPE=Debug
innodb_gis.rtree_purge '16k'             w2 [ pass ]  109788
innodb_gis.rtree_purge '32k'             w2 [ pass ]  62361
innodb_gis.rtree_purge '4k'              w1 [ pass ]  89423
innodb_gis.rtree_purge '64k'             w1 [ pass ]  72082
innodb_gis.rtree_purge '8k'              w1 [ pass ]  98452
main.alter_table_lock                    w2 [ pass ]     38
main.cte_recursive                       w2 [ pass ]  180047
main.join_cache_notasan                  w1 [ pass ]    166
main.sum_distinct-big                    w1 [ skipped ]  Can't be run WITH_MSAN and CMAKE_BUILD_TYPE=Debug
maria.max_length                         w1 [ skipped ]  Can't be run WITH_MSAN and CMAKE_BUILD_TYPE=Debug
perfschema.statement_digest_long_query   w1 [ skipped ]  Can't be run WITH_MSAN and CMAKE_BUILD_TYPE=Debug
2025-05-28 16:33:49 +10:00

134 lines
3.9 KiB
Text

# Test max data length
# This test will use around 1.3G of disk space!
--source include/have_maria.inc
--source include/have_sequence.inc
--source include/big_test.inc
# This test is too slow for valgrind
--source include/not_valgrind.inc
--source include/not_msan_with_debug.inc
drop table if exists t1,t2;
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;
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;
show create table t1;
show create table t2;
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;
#
# Check that we don't get table-is-full
#
create table t1 (
c1 int unsigned,
c2 char(80)
) Engine=ARIA ROW_FORMAT=FIXED min_rows=1000000;
show create table t1;
insert into t1 select seq,seq from seq_1_to_100000;
create or replace table t1 (
c1 int unsigned,
c2 char(80)
) Engine=ARIA ROW_FORMAT=FIXED;
show create table t1;
insert into t1 select seq,seq from seq_1_to_100000;
create or replace table t1 (
c1 int unsigned,
c2 char(80)
) Engine=ARIA ROW_FORMAT=PAGE TRANSACTIONAL=0;
show create table t1;
insert into t1 select seq,seq from seq_1_to_100000;
#
# For these we should get table is full error
#
create or replace table t1 (
c1 int unsigned,
c2 char(80)
) Engine=ARIA ROW_FORMAT=FIXED MAX_ROWS=10;
show create table t1;
--error ER_RECORD_FILE_FULL
insert into t1 select seq,seq from seq_1_to_100000;
select count(*) from t1;
create or replace table t1 (
c1 int unsigned,
c2 char(80)
) Engine=ARIA ROW_FORMAT=DYNAMIC MAX_ROWS=10;
show create table t1;
--error ER_RECORD_FILE_FULL
insert into t1 select seq,seq from seq_1_to_100000;
select count(*) from t1;
check table t1;
# PAGE uses 3 byte pointers as minimum, which can handle up to 200M files
create or replace table t1 (
c1 int unsigned,
c2 char(80)
) Engine=ARIA ROW_FORMAT=PAGE MAX_ROWS=10;
show create table t1;
insert into t1 select seq,seq from seq_1_to_100000;
select count(*) from t1;
check table t1;
drop table t1;
create or replace table t1 (
c1 int unsigned,
c2 char(80)
) Engine=ARIA ROW_FORMAT=PAGE MAX_ROWS=10;
show create table t1;
--error ER_RECORD_FILE_FULL
insert into t1 select seq,seq from seq_1_to_10000000;
select count(*) from t1;
check table t1;
--replace_column 12 # 13 # 14 #
show table status like "t1";
create index seq on t1(c1);
--replace_column 12 # 13 # 14 #
show table status like "t1";
drop table t1;