Skip to content

Commit

Permalink
MDEV-11454: Improve test case innodb_buffer_pool_dump_pct
Browse files Browse the repository at this point in the history
Based off feedback from Marko Mäkelä:
* Don't set timeouts on restart.
* Use innodb_fast_shutdown=0

Also:

Set innodb_buffer_pool_instances=1 - adds predicability to tests
- if a biased pool is used less pages could be saved.

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
  • Loading branch information
grooverdan committed Dec 8, 2016
1 parent 84379b0 commit 473fb92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
SET GLOBAL innodb_buffer_pool_dump_pct=25, global innodb_buffer_pool_dump_at_shutdown=1;;
# populate with data
CREATE TABLE t1 (
c01 blob, c02 blob, c03 blob, c04 blob, c05 blob,
Expand Down Expand Up @@ -31,6 +30,7 @@ INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,
@a,@a,@a,@a
);
insert into t1 select * from t1;
SET GLOBAL innodb_buffer_pool_dump_pct=25,GLOBAL innodb_fast_shutdown=0, GLOBAL innodb_buffer_pool_dump_at_shutdown=1;
# Restart server
SET GLOBAL innodb_buffer_pool_load_now=1;
# Case 1: Limit from innodb_buffer_pool_dump_pct
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
--loose-innodb_buffer_pool_load_at_startup=0
--loose-innodb_buffer_pool_dump_at_shutdown=0
--loose-innodb-buffer-pool-size=8M
--loose-innodb-buffer-pool-instances=1
--loose-innodb-page-size=16k
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@

-- source include/have_innodb.inc

--let $PCT=25

--eval SET GLOBAL innodb_buffer_pool_dump_pct=$PCT, global innodb_buffer_pool_dump_at_shutdown=1;

--echo # populate with data

CREATE TABLE t1 (
Expand Down Expand Up @@ -49,11 +45,12 @@ insert into t1 select * from t1;

--let $blob_pages=`select count(*) from information_schema.INNODB_BUFFER_PAGE WHERE PAGE_TYPE='BLOB' group by PAGE_TYPE`

--let $PCT=25
--eval SET GLOBAL innodb_buffer_pool_dump_pct=$PCT,GLOBAL innodb_fast_shutdown=0, GLOBAL innodb_buffer_pool_dump_at_shutdown=1

# Dump on shutdown has been set - shutdown now

--echo # Restart server
--let $shutdown_timeout= 10
--let $allow_rpl_inited= 1
--source include/restart_mysqld.inc

SET GLOBAL innodb_buffer_pool_load_now=1;
Expand Down

0 comments on commit 473fb92

Please sign in to comment.