mirror of
https://github.com/MariaDB/server.git
synced 2025-05-07 04:01:59 +03:00
Analysis: Lengths which are not UNIV_SQL_NULL, but bigger than the following number indicate that a field contains a reference to an externally stored part of the field in the tablespace. The length field then contains the sum of the following flag and the locally stored len. This was incorrectly set to define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE_MAX) When it should be define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE_DEF) Additionally, we need to disable support for > 16K page size for row compressed tables because a compressed page directory entry reserves 14 bits for the start offset and 2 bits for flags. This limits the uncompressed page size to 16k. To support larger pages page directory entry needs to be larger.
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
--source include/have_innodb.inc
|
|
--source include/have_innodb_16k.inc
|
|
|
|
--disable_query_log
|
|
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
|
|
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
|
|
--enable_query_log
|
|
|
|
SET GLOBAL innodb_file_format = `Barracuda`;
|
|
SET GLOBAL innodb_file_per_table = ON;
|
|
|
|
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;
|
|
|
|
--disable_query_log
|
|
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
|
|
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
|
|
--enable_query_log
|