| 1 |
# |
| 2 |
# Basic test for innodb_buffer_pool_load_now |
| 3 |
# |
| 4 |
|
| 5 |
-- source include/have_innodb.inc |
| 6 |
|
| 7 |
# Check the default value |
| 8 |
SELECT @@global.innodb_buffer_pool_load_now; |
| 9 |
|
| 10 |
# Make sure there is a dump file to load |
| 11 |
|
| 12 |
-- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` |
| 13 |
-- error 0,1 |
| 14 |
-- file_exists $file |
| 15 |
if ($errno) |
| 16 |
{ |
| 17 |
# Dump file does not exist, get it created |
| 18 |
--disable_query_log |
| 19 |
--disable_result_log |
| 20 |
--source innodb_buffer_pool_dump_now_basic.test |
| 21 |
--enable_result_log |
| 22 |
--enable_query_log |
| 23 |
} |
| 24 |
|
| 25 |
let $old_load_status= |
| 26 |
`SELECT variable_value FROM information_schema.global_status |
| 27 |
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'`; |
| 28 |
|
| 29 |
# Load the dump |
| 30 |
SET GLOBAL innodb_buffer_pool_load_now = ON; |
| 31 |
|
| 32 |
# Wait for the load to complete |
| 33 |
let $wait_condition = |
| 34 |
SELECT variable_value != '$old_load_status' && |
| 35 |
SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at ' |
| 36 |
FROM information_schema.global_status |
| 37 |
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'; |
| 38 |
--disable_warnings |
| 39 |
-- source include/wait_condition.inc |
| 40 |
--enable_warnings |
| 41 |
|
| 42 |
# Show the status, interesting if the above timed out |
| 43 |
--disable_warnings |
| 44 |
-- replace_regex /[0-9]{6}[[:space:]]+[0-9]{1,2}:[0-9]{2}:[0-9]{2}/TIMESTAMP_NOW/ |
| 45 |
SELECT variable_value |
| 46 |
FROM information_schema.global_status |
| 47 |
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'; |
| 48 |
--enable_warnings |
| 49 |
|