summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/t/rows-32m-rand-insert.test
blob: c26e79913d0d9e60f5aded645589d264d4b2180e (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
source include/have_tokudb.inc;
# do a lot of longblob insertions up to 32MB-4 in size with a random key
--source include/big_test.inc

SET DEFAULT_STORAGE_ENGINE='tokudb';

--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,,);

let $nrows=1000;
let $maxid=$nrows;
let $maxblob=32*1024*1024;
while ($nrows) {
      eval insert ignore into t (id,v) values (floor(rand()*$maxid),repeat('a',($maxblob-4)*rand()));
      dec $nrows;
}

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

check table t;

optimize table t;

check table t;

drop table t;