| 1 |
# |
| 2 |
# Basic test for innodb_idle_flush_pct |
| 3 |
# |
| 4 |
|
| 5 |
SET @start_global_value = @@global.innodb_idle_flush_pct; |
| 6 |
SELECT @start_global_value; |
| 7 |
|
| 8 |
# |
| 9 |
# exists as global only |
| 10 |
# |
| 11 |
--echo Valid values are between 0 and 100 |
| 12 |
select @@global.innodb_idle_flush_pct between 0 and 100; |
| 13 |
select @@global.innodb_idle_flush_pct; |
| 14 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 15 |
select @@session.innodb_idle_flush_pct; |
| 16 |
show global variables like 'innodb_idle_flush_pct'; |
| 17 |
show session variables like 'innodb_idle_flush_pct'; |
| 18 |
select * from performance_schema.global_variables where variable_name='innodb_idle_flush_pct'; |
| 19 |
select * from performance_schema.session_variables where variable_name='innodb_idle_flush_pct'; |
| 20 |
|
| 21 |
# |
| 22 |
# show that it's writable |
| 23 |
# |
| 24 |
set global innodb_idle_flush_pct=10; |
| 25 |
select @@global.innodb_idle_flush_pct; |
| 26 |
select * from performance_schema.global_variables where variable_name='innodb_idle_flush_pct'; |
| 27 |
select * from performance_schema.session_variables where variable_name='innodb_idle_flush_pct'; |
| 28 |
--error ER_GLOBAL_VARIABLE |
| 29 |
set session innodb_idle_flush_pct=1; |
| 30 |
|
| 31 |
# |
| 32 |
# incorrect types |
| 33 |
# |
| 34 |
--error ER_WRONG_TYPE_FOR_VAR |
| 35 |
set global innodb_idle_flush_pct=1.1; |
| 36 |
--error ER_WRONG_TYPE_FOR_VAR |
| 37 |
set global innodb_idle_flush_pct=1e1; |
| 38 |
--error ER_WRONG_TYPE_FOR_VAR |
| 39 |
set global innodb_idle_flush_pct="bar"; |
| 40 |
--error ER_WRONG_TYPE_FOR_VAR |
| 41 |
set global innodb_idle_flush_pct=ON; |
| 42 |
--error ER_WRONG_TYPE_FOR_VAR |
| 43 |
set global innodb_idle_flush_pct=OFF; |
| 44 |
|
| 45 |
set global innodb_idle_flush_pct=-7; |
| 46 |
select @@global.innodb_idle_flush_pct; |
| 47 |
select * from performance_schema.global_variables where variable_name='innodb_idle_flush_pct'; |
| 48 |
set global innodb_idle_flush_pct=101; |
| 49 |
select @@global.innodb_idle_flush_pct; |
| 50 |
select * from performance_schema.global_variables where variable_name='innodb_idle_flush_pct'; |
| 51 |
|
| 52 |
# |
| 53 |
# min/max/DEFAULT values |
| 54 |
# |
| 55 |
set global innodb_idle_flush_pct=0; |
| 56 |
select @@global.innodb_idle_flush_pct; |
| 57 |
set global innodb_idle_flush_pct=100; |
| 58 |
select @@global.innodb_idle_flush_pct; |
| 59 |
set global innodb_idle_flush_pct=DEFAULT; |
| 60 |
select @@global.innodb_idle_flush_pct; |
| 61 |
|
| 62 |
# Cleanup |
| 63 |
SET @@global.innodb_idle_flush_pct = @start_global_value; |
| 64 |
SELECT @@global.innodb_idle_flush_pct; |