Debian Codegraph @

mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test

raw
1 #
2 # Basic test for innodb_buffer_pool_filename
3 #
4
5 # --force-restart from
6 # mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic-master.opt
7 # does not seem to work on Windows (test being executed without a restart)
8 -- source include/not_windows.inc
9
10 # Check the default value and save for later restoration
11 SET @orig = @@global.innodb_buffer_pool_filename;
12 SELECT @orig;
13
14 # Make sure that --force-restart in the .opt file has worked and that
15 # the value of this status variable is not something like
16 # 'Buffer pool(s) dump completed at ' left from previous runs because if
17 # it is then the following wait condition may be satisfied without the
18 # dump actually being complete and file_exists may fail.
19 let $status_var = innodb_buffer_pool_dump_status;
20 let $status_var_value = Dumping of buffer pool not started;
21 -- source include/wait_for_status_var.inc
22 --disable_warnings
23 SELECT variable_value
24 FROM performance_schema.global_status
25 WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status';
26 --enable_warnings
27
28 # Try with a non-default filename
29
30 SET GLOBAL innodb_buffer_pool_filename = 'innodb_foobar_dump';
31
32 SET GLOBAL innodb_buffer_pool_dump_now = ON;
33 -- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)`
34
35 # Wait for the dump to complete
36 let $wait_condition =
37 SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at '
38 FROM performance_schema.global_status
39 WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status';
40 --disable_warnings
41 -- source include/wait_condition.inc
42 --enable_warnings
43
44 -- file_exists $file
45
46 # Restore the env
47 SET GLOBAL innodb_buffer_pool_filename = @orig;