| 1 |
# |
| 2 |
# Bug #18756233 ASSERT !HAS_DONE_RESERVATION, |
| 3 |
# FSEG_ALLOC_FREE_PAGE_LOW(), BTR_STORE_BIG_REC_EXTE |
| 4 |
# |
| 5 |
create table t1 (f1 int primary key, f2 longblob, f3 longblob) engine = innodb; |
| 6 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 7 |
where name = 'test/t1'; |
| 8 |
name clust_index_size |
| 9 |
test/t1 0 |
| 10 |
# If the page size is 16K, an uncompressed blob page can hold |
| 11 |
# data of 16330 bytes. Insert 64 pages of data (64 * 16330 = |
| 12 |
# 1045120 bytes) so that 1 extent will be reserved and used. |
| 13 |
insert into t1 values (1, repeat('%', 1045120), repeat('~', 1045120)); |
| 14 |
set global innodb_buf_flush_list_now = 1; |
| 15 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 16 |
where name = 'test/t1'; |
| 17 |
name clust_index_size |
| 18 |
test/t1 1 |
| 19 |
# This will reserve 2 extents. |
| 20 |
insert into t1 values (2, repeat('%', 1045121), repeat('~', 1045121)); |
| 21 |
set global innodb_buf_flush_list_now = 1; |
| 22 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 23 |
where name = 'test/t1'; |
| 24 |
name clust_index_size |
| 25 |
test/t1 289 |
| 26 |
# This will reserve 1 extent. |
| 27 |
insert into t1 values (3, repeat('%', 1045119), repeat('~', 1045119)); |
| 28 |
set global innodb_buf_flush_list_now = 1; |
| 29 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 30 |
where name = 'test/t1'; |
| 31 |
name clust_index_size |
| 32 |
test/t1 289 |
| 33 |
drop table t1; |
| 34 |
set global innodb_compression_level=0; |
| 35 |
create table t2 (f1 int primary key, f2 longblob, f3 longblob) engine=innodb |
| 36 |
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; |
| 37 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 38 |
where name = 'test/t2'; |
| 39 |
name clust_index_size |
| 40 |
test/t2 0 |
| 41 |
# For KBS=1, the payload is 986 bytes. The extent will contain |
| 42 |
# 1048576/1024 = 1024 pages. So total bytes is 1024 * 986 = 1009664. |
| 43 |
# This will reserve 1 extent. |
| 44 |
insert into t2 values (1, repeat('%', 1009664), repeat('~', 1009664)); |
| 45 |
set global innodb_buf_flush_list_now = 1; |
| 46 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 47 |
where name = 'test/t2'; |
| 48 |
name clust_index_size |
| 49 |
test/t2 1 |
| 50 |
# This will reserve 2 extent. |
| 51 |
insert into t2 values (2, repeat('%', 1009665), repeat('~', 1009665)); |
| 52 |
set global innodb_buf_flush_list_now = 1; |
| 53 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 54 |
where name = 'test/t2'; |
| 55 |
name clust_index_size |
| 56 |
test/t2 4257 |
| 57 |
# This will reserve 1 extent. |
| 58 |
insert into t2 values (3, repeat('%', 1009663), repeat('~', 1009663)); |
| 59 |
set global innodb_buf_flush_list_now = 1; |
| 60 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 61 |
where name = 'test/t2'; |
| 62 |
name clust_index_size |
| 63 |
test/t2 4257 |
| 64 |
drop table t2; |
| 65 |
set global innodb_compression_level=3; |
| 66 |
create table t3 (f1 int primary key, f2 longblob, f3 longblob) engine=innodb |
| 67 |
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; |
| 68 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 69 |
where name = 'test/t3'; |
| 70 |
name clust_index_size |
| 71 |
test/t3 0 |
| 72 |
# For KBS=1, the payload is 986 bytes. The extent will contain |
| 73 |
# 1048576/1024 = 1024 pages. So total bytes is 4 * 1024 * 986 = 4038656. |
| 74 |
# This will reserve <= 4 extent. |
| 75 |
insert into t3 values (1, repeat('%', 4038656), repeat('~', 4038656)); |
| 76 |
set global innodb_buf_flush_list_now = 1; |
| 77 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 78 |
where name = 'test/t3'; |
| 79 |
name clust_index_size |
| 80 |
test/t3 1 |
| 81 |
# This will reserve <= 4 extent |
| 82 |
insert into t3 values (2, repeat('%', 4038655), repeat('~', 4038655)); |
| 83 |
set global innodb_buf_flush_list_now = 1; |
| 84 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 85 |
where name = 'test/t3'; |
| 86 |
name clust_index_size |
| 87 |
test/t3 161 |
| 88 |
# This will reserve <= 4 extent |
| 89 |
insert into t3 values (3, repeat('%', 4038657), repeat('~', 4038657)); |
| 90 |
set global innodb_buf_flush_list_now = 1; |
| 91 |
select name, clust_index_size from information_schema.innodb_tablestats |
| 92 |
where name = 'test/t3'; |
| 93 |
name clust_index_size |
| 94 |
test/t3 161 |
| 95 |
drop table t3; |
| 96 |
set global innodb_compression_level=default; |