| 1 |
|
| 2 |
|
| 3 |
# 2010-01-25 - Added |
| 4 |
# |
| 5 |
|
| 6 |
|
| 7 |
SET @start_global_value = @@global.innodb_old_blocks_pct; |
| 8 |
SELECT @start_global_value; |
| 9 |
|
| 10 |
# |
| 11 |
# exists as global only |
| 12 |
# |
| 13 |
--echo Valid values are between 5 and 95 |
| 14 |
select @@global.innodb_old_blocks_pct between 5 and 95; |
| 15 |
select @@global.innodb_old_blocks_pct; |
| 16 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 17 |
select @@session.innodb_old_blocks_pct; |
| 18 |
show global variables like 'innodb_old_blocks_pct'; |
| 19 |
show session variables like 'innodb_old_blocks_pct'; |
| 20 |
--disable_warnings |
| 21 |
select * from performance_schema.global_variables where variable_name='innodb_old_blocks_pct'; |
| 22 |
select * from performance_schema.session_variables where variable_name='innodb_old_blocks_pct'; |
| 23 |
--enable_warnings |
| 24 |
|
| 25 |
# |
| 26 |
# show that it's writable |
| 27 |
# |
| 28 |
set global innodb_old_blocks_pct=10; |
| 29 |
select @@global.innodb_old_blocks_pct; |
| 30 |
--disable_warnings |
| 31 |
select * from performance_schema.global_variables where variable_name='innodb_old_blocks_pct'; |
| 32 |
select * from performance_schema.session_variables where variable_name='innodb_old_blocks_pct'; |
| 33 |
--enable_warnings |
| 34 |
--error ER_GLOBAL_VARIABLE |
| 35 |
set session innodb_old_blocks_pct=1; |
| 36 |
|
| 37 |
# |
| 38 |
# check the default value |
| 39 |
# |
| 40 |
set @@global.innodb_old_blocks_pct=DEFAULT; |
| 41 |
select @@global.innodb_old_blocks_pct; |
| 42 |
|
| 43 |
# |
| 44 |
# incorrect types |
| 45 |
# |
| 46 |
--error ER_WRONG_TYPE_FOR_VAR |
| 47 |
set global innodb_old_blocks_pct=1.1; |
| 48 |
--error ER_WRONG_TYPE_FOR_VAR |
| 49 |
set global innodb_old_blocks_pct=1e1; |
| 50 |
--error ER_WRONG_TYPE_FOR_VAR |
| 51 |
set global innodb_old_blocks_pct="foo"; |
| 52 |
--error ER_WRONG_TYPE_FOR_VAR |
| 53 |
set global innodb_old_blocks_pct=" "; |
| 54 |
--error ER_WRONG_TYPE_FOR_VAR |
| 55 |
set global innodb_old_blocks_pct=''; |
| 56 |
|
| 57 |
set global innodb_old_blocks_pct=4; |
| 58 |
select @@global.innodb_old_blocks_pct; |
| 59 |
--disable_warnings |
| 60 |
select * from performance_schema.global_variables where variable_name='innodb_old_blocks_pct'; |
| 61 |
--enable_warnings |
| 62 |
set global innodb_old_blocks_pct=-7; |
| 63 |
select @@global.innodb_old_blocks_pct; |
| 64 |
--disable_warnings |
| 65 |
select * from performance_schema.global_variables where variable_name='innodb_old_blocks_pct'; |
| 66 |
--enable_warnings |
| 67 |
set global innodb_old_blocks_pct=96; |
| 68 |
select @@global.innodb_old_blocks_pct; |
| 69 |
--disable_warnings |
| 70 |
select * from performance_schema.global_variables where variable_name='innodb_old_blocks_pct'; |
| 71 |
--enable_warnings |
| 72 |
|
| 73 |
# |
| 74 |
# min/max values |
| 75 |
# |
| 76 |
set global innodb_old_blocks_pct=5; |
| 77 |
select @@global.innodb_old_blocks_pct; |
| 78 |
set global innodb_old_blocks_pct=95; |
| 79 |
select @@global.innodb_old_blocks_pct; |
| 80 |
|
| 81 |
SET @@global.innodb_old_blocks_pct = @start_global_value; |
| 82 |
SELECT @@global.innodb_old_blocks_pct; |