#
# Basic test for innodb_buffer_pool_dump_now
#

-- source include/have_innodb.inc

# Check the default value
SET @orig = @@global.innodb_buffer_pool_dump_now;
SELECT @orig;

# Do the dump
SET GLOBAL innodb_buffer_pool_dump_now = ON;
# Should always be OFF
SELECT @@global.innodb_buffer_pool_dump_now;

# 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
