2012-01-18 18:43:34 +00:00
|
|
|
# verify that trickle loads or bulk loads can not insert values > 32MB
|
|
|
|
|
|
|
|
set storage_engine='tokudb';
|
|
|
|
|
2012-01-20 13:14:39 +00:00
|
|
|
call mtr.add_suppression("TokuDB.*");
|
|
|
|
call mtr.add_suppression(".*returned handler error 22");
|
|
|
|
|
2012-01-18 18:43:34 +00:00
|
|
|
--disable_warnings
|
|
|
|
drop table if exists t;
|
|
|
|
--enable_warnings
|
|
|
|
|
|
|
|
create table t (id int not null primary key, v0 longblob not null,v1 longblob not null);
|
|
|
|
|
2012-01-18 22:12:54 +00:00
|
|
|
select @@max_allowed_packet into @my_max_allowed_packet;
|
2012-03-14 17:35:44 +00:00
|
|
|
--disable_warnings
|
2012-01-18 22:12:54 +00:00
|
|
|
set global max_allowed_packet=100000000;
|
2012-03-14 17:35:44 +00:00
|
|
|
--enable_warnings
|
2012-01-18 22:12:54 +00:00
|
|
|
|
|
|
|
connect(conn1,localhost,root,,);
|
|
|
|
|
2012-01-18 18:43:34 +00:00
|
|
|
# find a value that works
|
|
|
|
--error 1030
|
|
|
|
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024));
|
|
|
|
--error 1030
|
|
|
|
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-1));
|
|
|
|
--error 1030
|
|
|
|
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-2));
|
|
|
|
--error 1030
|
|
|
|
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-3));
|
|
|
|
--error 1030
|
|
|
|
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-4));
|
|
|
|
--error 1030
|
|
|
|
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-5));
|
|
|
|
--error 1030
|
|
|
|
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-6));
|
|
|
|
--error 1030
|
|
|
|
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-7));
|
|
|
|
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-8));
|
|
|
|
|
|
|
|
select id,length(v0),length(v1) from t;
|
|
|
|
|
|
|
|
# the bulk loader should detect the large row and fail
|
|
|
|
truncate table t;
|
|
|
|
--error 1030
|
|
|
|
insert into t values (1,'a','a'),(2,'b','b'),(3,'c','c'),(4,'d','d'),(5,repeat('e',16*1024*1024),repeat('f',16*1024*1024));
|
|
|
|
select id,length(v0),length(v1) from t;
|
|
|
|
|
|
|
|
# the trickle loader should detect the large row and fail
|
|
|
|
truncate table t;
|
|
|
|
insert into t values (1,'a','a'),(2,'b','b'),(3,'c','c'),(4,'d','d');
|
|
|
|
--error 1030
|
|
|
|
insert into t values (5,repeat('e',16*1024*1024),repeat('f',16*1024*1024));
|
|
|
|
select id,length(v0),length(v1) from t;
|
|
|
|
|
2012-01-18 22:12:54 +00:00
|
|
|
connection default;
|
|
|
|
disconnect conn1;
|
|
|
|
set global max_allowed_packet=@my_max_allowed_packet;
|
|
|
|
|
2012-01-18 18:43:34 +00:00
|
|
|
drop table t;
|