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