mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
e072fc19e0
git-svn-id: file:///svn/mysql/tests/mysql-test@40865 c7de825b-a66e-492c-adef-691d508d4ae1
51 lines
No EOL
1.4 KiB
Text
51 lines
No EOL
1.4 KiB
Text
# verify that trickle loads or bulk loads can not insert values > 32MB
|
|
|
|
set storage_engine='tokudb';
|
|
|
|
call mtr.add_suppression("TokuDB.*");
|
|
call mtr.add_suppression(".*returned handler error 22");
|
|
|
|
--disable_warnings
|
|
drop table if exists t;
|
|
--enable_warnings
|
|
|
|
create table t (id int not null primary key, v longblob not null);
|
|
|
|
select @@max_allowed_packet into @my_max_allowed_packet;
|
|
--disable_warnings
|
|
set global max_allowed_packet=100000000;
|
|
--enable_warnings
|
|
|
|
connect(conn1,localhost,root,,);
|
|
|
|
# find a value that works
|
|
--error 1030
|
|
insert into t values (1,repeat('a',32*1024*1024));
|
|
--error 1030
|
|
insert into t values (1,repeat('a',32*1024*1024-1));
|
|
--error 1030
|
|
insert into t values (1,repeat('a',32*1024*1024-2));
|
|
--error 1030
|
|
insert into t values (1,repeat('a',32*1024*1024-3));
|
|
|
|
insert into t values (1,repeat('a',32*1024*1024-4));
|
|
select id,length(v) from t;
|
|
|
|
# the bulk loader should detect the large row and fail
|
|
truncate table t;
|
|
--error 1030
|
|
insert into t values (1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,repeat('e',32*1024*1024-1));
|
|
select id,length(v) from t;
|
|
|
|
# the trickle loader should detect the large row and fail
|
|
truncate table t;
|
|
insert into t values (1,'a'),(2,'b'),(3,'c'),(4,'d');
|
|
--error 1030
|
|
insert into t values (5,repeat('e',32*1024*1024-1));
|
|
select id,length(v) from t;
|
|
|
|
connection default;
|
|
disconnect conn1;
|
|
set global max_allowed_packet=@my_max_allowed_packet;
|
|
|
|
drop table t; |