| 1 |
|
| 2 |
|
| 3 |
# 2010-01-27 - Added |
| 4 |
# |
| 5 |
|
| 6 |
--source include/have_innodb.inc |
| 7 |
|
| 8 |
SET @start_global_value = @@global.innodb_io_capacity; |
| 9 |
SELECT @start_global_value; |
| 10 |
|
| 11 |
# |
| 12 |
# exists as global only |
| 13 |
# |
| 14 |
--echo Valid value 100 or more |
| 15 |
select @@global.innodb_io_capacity > 99; |
| 16 |
select @@global.innodb_io_capacity; |
| 17 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 18 |
select @@session.innodb_io_capacity; |
| 19 |
show global variables like 'innodb_io_capacity'; |
| 20 |
show session variables like 'innodb_io_capacity'; |
| 21 |
select * from information_schema.global_variables where variable_name='innodb_io_capacity'; |
| 22 |
select * from information_schema.session_variables where variable_name='innodb_io_capacity'; |
| 23 |
|
| 24 |
# |
| 25 |
# show that it's writable |
| 26 |
# |
| 27 |
set global innodb_io_capacity=123; |
| 28 |
select @@global.innodb_io_capacity; |
| 29 |
select * from information_schema.global_variables where variable_name='innodb_io_capacity'; |
| 30 |
select * from information_schema.session_variables where variable_name='innodb_io_capacity'; |
| 31 |
--error ER_GLOBAL_VARIABLE |
| 32 |
set session innodb_io_capacity=444; |
| 33 |
|
| 34 |
# |
| 35 |
# incorrect types |
| 36 |
# |
| 37 |
--error ER_WRONG_TYPE_FOR_VAR |
| 38 |
set global innodb_io_capacity=1.1; |
| 39 |
--error ER_WRONG_TYPE_FOR_VAR |
| 40 |
set global innodb_io_capacity=1e1; |
| 41 |
--error ER_WRONG_TYPE_FOR_VAR |
| 42 |
set global innodb_io_capacity="foo"; |
| 43 |
|
| 44 |
set global innodb_io_capacity=7; |
| 45 |
select @@global.innodb_io_capacity; |
| 46 |
select * from information_schema.global_variables where variable_name='innodb_io_capacity'; |
| 47 |
set global innodb_io_capacity=-7; |
| 48 |
select @@global.innodb_io_capacity; |
| 49 |
select * from information_schema.global_variables where variable_name='innodb_io_capacity'; |
| 50 |
|
| 51 |
# |
| 52 |
# min/max values |
| 53 |
# |
| 54 |
set global innodb_io_capacity=100; |
| 55 |
select @@global.innodb_io_capacity; |
| 56 |
|
| 57 |
# |
| 58 |
# cleanup |
| 59 |
# |
| 60 |
|
| 61 |
SET @@global.innodb_io_capacity = @start_global_value; |
| 62 |
SELECT @@global.innodb_io_capacity; |