Current Path : /usr/opt/mysql57/mysql-test/suite/innodb/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/mysql57/mysql-test/suite/innodb/t/blob_page_reserve.test |
--source include/have_innodb.inc --source include/have_innodb_16k.inc --source include/no_valgrind_without_big.inc --source include/have_debug.inc --echo # --echo # Bug #18756233 ASSERT !HAS_DONE_RESERVATION, --echo # FSEG_ALLOC_FREE_PAGE_LOW(), BTR_STORE_BIG_REC_EXTE --echo # create table t1 (f1 int primary key, f2 longblob, f3 longblob) engine = innodb; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t1'; --echo # If the page size is 16K, an uncompressed blob page can hold --echo # data of 16330 bytes. Insert 64 pages of data (64 * 16330 = --echo # 1045120 bytes) so that 1 extent will be reserved and used. insert into t1 values (1, repeat('%', 1045120), repeat('~', 1045120)); set global innodb_buf_flush_list_now = 1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t1'; --echo # This will reserve 2 extents. insert into t1 values (2, repeat('%', 1045121), repeat('~', 1045121)); set global innodb_buf_flush_list_now = 1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t1'; --echo # This will reserve 1 extent. insert into t1 values (3, repeat('%', 1045119), repeat('~', 1045119)); set global innodb_buf_flush_list_now = 1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t1'; drop table t1; set global innodb_compression_level=0; create table t2 (f1 int primary key, f2 longblob, f3 longblob) engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t2'; --echo # For KBS=1, the payload is 986 bytes. The extent will contain --echo # 1048576/1024 = 1024 pages. So total bytes is 1024 * 986 = 1009664. --echo # This will reserve 1 extent. insert into t2 values (1, repeat('%', 1009664), repeat('~', 1009664)); set global innodb_buf_flush_list_now = 1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t2'; --echo # This will reserve 2 extent. insert into t2 values (2, repeat('%', 1009665), repeat('~', 1009665)); set global innodb_buf_flush_list_now = 1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t2'; --echo # This will reserve 1 extent. insert into t2 values (3, repeat('%', 1009663), repeat('~', 1009663)); set global innodb_buf_flush_list_now = 1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t2'; drop table t2; set global innodb_compression_level=3; create table t3 (f1 int primary key, f2 longblob, f3 longblob) engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t3'; --echo # For KBS=1, the payload is 986 bytes. The extent will contain --echo # 1048576/1024 = 1024 pages. So total bytes is 4 * 1024 * 986 = 4038656. --echo # This will reserve <= 4 extent. insert into t3 values (1, repeat('%', 4038656), repeat('~', 4038656)); set global innodb_buf_flush_list_now = 1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t3'; --echo # This will reserve <= 4 extent insert into t3 values (2, repeat('%', 4038655), repeat('~', 4038655)); set global innodb_buf_flush_list_now = 1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t3'; --echo # This will reserve <= 4 extent insert into t3 values (3, repeat('%', 4038657), repeat('~', 4038657)); set global innodb_buf_flush_list_now = 1; select name, clust_index_size from information_schema.innodb_sys_tablestats where name = 'test/t3'; drop table t3; set global innodb_compression_level=default;