File: innodb_buffer_pool_filename_basic.test

package info (click to toggle)
percona-xtrabackup 2.2.3-2.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 293,260 kB
  • ctags: 146,881
  • sloc: cpp: 1,051,960; ansic: 570,217; java: 54,595; perl: 53,495; pascal: 44,194; sh: 27,826; yacc: 15,314; python: 12,142; xml: 7,848; sql: 4,125; makefile: 1,459; awk: 785; lex: 758
file content (44 lines) | stat: -rw-r--r-- 1,583 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# Basic test for innodb_buffer_pool_filename
#

-- source include/have_innodb.inc
# --force-restart from
# mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic-master.opt
# does not seem to work on Windows (test being executed without a restart)
-- source include/not_windows.inc

# Check the default value and save for later restoration
SET @orig = @@global.innodb_buffer_pool_filename;
SELECT @orig;

# Make sure that --force-restart in the .opt file has worked and that
# the value of this status variable is not something like
# 'Buffer pool(s) dump completed at ' left from previous runs because if
# it is then the following wait condition may be satisfied without the
# dump actually being complete and file_exists may fail.
let $status_var = innodb_buffer_pool_dump_status;
let $status_var_value = not started;
-- source include/wait_for_status_var.inc
SELECT variable_value
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status';

# Try with a non-default filename

SET GLOBAL innodb_buffer_pool_filename = 'innodb_foobar_dump';

SET GLOBAL innodb_buffer_pool_dump_now = ON;
-- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)`

# 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

-- file_exists $file

# Restore the env
SET GLOBAL innodb_buffer_pool_filename = @orig;