mariadb/mysql-test/suite/innodb/t/innodb_blob_truncate.test
Marko Mäkelä 08413254b7 Remove references to innodb_file_format.
innodb_file_format=Barracuda is the default in MariaDB 10.2.
Do not set it, because the option will be removed in MariaDB 10.3.

Also, do not set innodb_file_per_table=1 because it is the default.

Note that MDEV-11828 should fix the test innodb.innodb-64k
already in 10.1.
2017-01-18 08:43:11 +02:00

32 lines
803 B
Text

--source include/have_innodb.inc
--source include/have_innodb_16k.inc
create table t1(a blob) engine=innodb key_block_size=8;
delimiter //;
create function generate_blob()
returns varchar(20000)
begin
declare x varchar(20000) default '';
declare i int default 500;
while i > 0 do
set x = concat(sha1(i), x);
set i = i - 1;
end while;
return x;
end //
delimiter ;//
insert into t1 select generate_blob();
let $x = `select 20000 - length(a) from t1`;
if ($x) {
echo Blob is truncated by $x bytes.;
die It must have been 20000 bytes.;
}
truncate t1;
insert into t1 select generate_blob();
let $x = `select 20000 - length(a) from t1`;
if ($x) {
echo Blob is truncated by $x bytes.;
die It must have been 20000 bytes.;
}
drop table t1;
drop function generate_blob;