Commit 56ce3fab authored by Rich Prohaska's avatar Rich Prohaska

#4352 test 32m blobs refs[t:4352]

git-svn-id: file:///svn/mysql/tests/mysql-test@38985 c7de825b-a66e-492c-adef-691d508d4ae1
parent 8fed2ad3
set storage_engine='tokudb';
drop table if exists t;
create table t (id int not null primary key, v longblob not null);
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));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',32*1024*1024-2));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',32*1024*1024-3));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',32*1024*1024-4));
select id,length(v) from t;
id length(v)
1 33554428
truncate table t;
insert into t values (1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,repeat('e',32*1024*1024-1));
ERROR HY000: Got error 22 from storage engine
select id,length(v) from t;
id length(v)
truncate table t;
insert into t values (1,'a'),(2,'b'),(3,'c'),(4,'d');
insert into t values (5,repeat('e',32*1024*1024-1));
ERROR HY000: Got error 22 from storage engine
select id,length(v) from t;
id length(v)
1 1
2 1
3 1
4 1
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);
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));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-2));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-3));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-4));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-5));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-6));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-7));
ERROR HY000: Got error 22 from storage engine
insert into t values (1,repeat('a',16*1024*1024),repeat('b',16*1024*1024-8));
select id,length(v0),length(v1) from t;
id length(v0) length(v1)
1 16777216 16777208
truncate table t;
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));
ERROR HY000: Got error 22 from storage engine
select id,length(v0),length(v1) from t;
id length(v0) length(v1)
truncate table t;
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));
ERROR HY000: Got error 22 from storage engine
select id,length(v0),length(v1) from t;
id length(v0) length(v1)
1 1 1
2 1 1
3 1 1
4 1 1
drop table t;
# verify that trickle loads or bulk loads can not insert values > 32MB
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);
# 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;
drop table t;
\ No newline at end of file
# verify that trickle loads or bulk loads can not insert values > 32MB
set storage_engine='tokudb';
--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);
# 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;
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