summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/t/rows-32m-1.test
blob: 39feddf77be5d4aee011da1b4401738695d79a44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
source include/have_tokudb.inc;
# verify that trickle loads or bulk loads can not insert values > 32MB

SET DEFAULT_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, v0 longblob not null,v1 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',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;

connection default;
disconnect conn1;
set global max_allowed_packet=@my_max_allowed_packet;

drop table t;