Commit 804a59e4 authored by Daniel Black's avatar Daniel Black

MDEV-8923: innodb_buffer_pool_dump_pct add test cases

Add testcases for innodb_buffer_pool_dump_pct
parent a816df70
SET @orig = @@global.innodb_buffer_pool_dump_pct;
SELECT @orig;
@orig
100
SET GLOBAL innodb_buffer_pool_dump_pct=3, GLOBAL innodb_buffer_pool_dump_now = ON;
SET GLOBAL innodb_buffer_pool_dump_pct=0;
SELECT @@global.innodb_buffer_pool_dump_pct;
@@global.innodb_buffer_pool_dump_pct
1
SHOW WARNINGS;
Level Code Message
Warning 1292 Truncated incorrect innodb_buffer_pool_dump_pct value: '0'
SET GLOBAL innodb_buffer_pool_dump_pct=101;
SELECT @@global.innodb_buffer_pool_dump_pct;
@@global.innodb_buffer_pool_dump_pct
100
SHOW WARNINGS;
Level Code Message
Warning 1292 Truncated incorrect innodb_buffer_pool_dump_pct value: '101'
SET GLOBAL innodb_buffer_pool_dump_pct=@orig;
#
# Basic test for innodb_buffer_pool_dump_pct
#
-- source include/have_innodb.inc
# Check the default value
SET @orig = @@global.innodb_buffer_pool_dump_pct;
SELECT @orig;
# Do the dump
SET GLOBAL innodb_buffer_pool_dump_pct=3, GLOBAL innodb_buffer_pool_dump_now = ON;
# Wait for the dump to complete
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at '
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status';
-- source include/wait_condition.inc
# Confirm that the dump file has been created
-- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)`
-- file_exists $file
--disable_warnings
SET GLOBAL innodb_buffer_pool_dump_pct=0;
SELECT @@global.innodb_buffer_pool_dump_pct;
SHOW WARNINGS;
SET GLOBAL innodb_buffer_pool_dump_pct=101;
SELECT @@global.innodb_buffer_pool_dump_pct;
SHOW WARNINGS;
--enable_warnings
SET GLOBAL innodb_buffer_pool_dump_pct=@orig;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment