mariadb/mysql-test/main/long_unique_big.test
Marko Mäkelä f458acc81e MDEV-27160 Out of memory in main.long_unique
A part of the test main.long_unique attempts to insert records
with two 60,000,001-byte columns. Let us move that test into
a separate file main.long_unique_big, declared as big test,
so that it can be skipped in environments with limited memory.
2021-12-03 09:56:30 +02:00

26 lines
1 KiB
Text

# This test may run out of memory in some environments.
--source include/big_test.inc
set @allowed_packet= @@max_allowed_packet;
SET GLOBAL max_allowed_packet=67108864;
connect (con1, localhost, root,,);
create table t1(a longblob unique, b longblob , c longblob , unique(b,c));
desc t1;
show create table t1;
show keys from t1;
insert into t1 values(concat(repeat('sachin',10000000),'1'),concat(repeat('sachin',10000000),'1'),
concat(repeat('sachin',10000000),'1'));
insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'),
concat(repeat('sachin',10000000),'1'));
--error ER_DUP_ENTRY
insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'),
concat(repeat('sachin',10000000),'4'));
--error ER_DUP_ENTRY
insert into t1 values(concat(repeat('sachin',10000000),'3'),concat(repeat('sachin',10000000),'1'),
concat(repeat('sachin',10000000),'1'));
drop table t1;
disconnect con1;
connection default;
set @@GLOBAL.max_allowed_packet= @allowed_packet;
--echo # End of 10.4 tests