Commit d11ac531 authored by Rich Prohaska's avatar Rich Prohaska

#4352 test 32MB rows in mysql refs[t:4352]

git-svn-id: file:///svn/mysql/tests/mysql-test@38996 c7de825b-a66e-492c-adef-691d508d4ae1
parent a481e532
set storage_engine='tokudb';
drop table if exists t;
create table t (id int not null primary key, v longblob not null);
select @@max_allowed_packet into @my_max_allowed_packet;
set global max_allowed_packet=100000000;
insert into t values (1,repeat('a',32*1024*1024));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',32*1024*1024-1));
......@@ -28,4 +30,5 @@ id length(v)
2 1
3 1
4 1
set global max_allowed_packet=@my_max_allowed_packet;
drop table t;
set storage_engine='tokudb';
drop table if exists t;
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;
set global max_allowed_packet=100000000;
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-1));
......@@ -36,4 +38,5 @@ id length(v0) length(v1)
2 1 1
3 1 1
4 1 1
set global max_allowed_packet=@my_max_allowed_packet;
drop table t;
This diff is collapsed.
This diff is collapsed.
......@@ -8,6 +8,11 @@ drop table if exists t;
create table t (id int not null primary key, v longblob not null);
select @@max_allowed_packet into @my_max_allowed_packet;
set global max_allowed_packet=100000000;
connect(conn1,localhost,root,,);
# find a value that works
--error 1030
insert into t values (1,repeat('a',32*1024*1024));
......@@ -34,4 +39,8 @@ insert into t values (1,'a'),(2,'b'),(3,'c'),(4,'d');
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;
\ No newline at end of file
......@@ -8,6 +8,11 @@ drop table if exists t;
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;
set global max_allowed_packet=100000000;
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));
......@@ -42,4 +47,8 @@ insert into t values (1,'a','a'),(2,'b','b'),(3,'c','c'),(4,'d','d');
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;
\ No newline at end of file
# do a lot of longblob insertions up to 32MB-4 in size with a random key
set 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;
set global max_allowed_packet=100000000;
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;
\ No newline at end of file
# do a lot of longblob insertions up to 32MB-4 in size with seq primary key
set storage_engine='tokudb';
--disable_warnings
drop table if exists t;
--enable_warnings
create table t (id int not null auto_increment primary key, v longblob not null);
select @@max_allowed_packet into @my_max_allowed_packet;
set global max_allowed_packet=100000000;
connect(conn1,localhost,root,,);
let $nrows=1000;
let $maxid=$nrows;
let $maxblob=32*1024*1024;
while ($nrows) {
eval insert into t (v) values (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;
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment