| 1 |
|
| 2 |
# |
| 3 |
# 2010-01-27 - Added |
| 4 |
# |
| 5 |
|
| 6 |
|
| 7 |
SET @start_global_value = @@global.innodb_spin_wait_delay; |
| 8 |
SELECT @start_global_value; |
| 9 |
|
| 10 |
# |
| 11 |
# exists as global only |
| 12 |
# |
| 13 |
--echo Valid values are zero or above |
| 14 |
select @@global.innodb_spin_wait_delay >=0; |
| 15 |
select @@global.innodb_spin_wait_delay; |
| 16 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 17 |
select @@session.innodb_spin_wait_delay; |
| 18 |
show global variables like 'innodb_spin_wait_delay'; |
| 19 |
show session variables like 'innodb_spin_wait_delay'; |
| 20 |
--disable_warnings |
| 21 |
select * from performance_schema.global_variables where variable_name='innodb_spin_wait_delay'; |
| 22 |
select * from performance_schema.session_variables where variable_name='innodb_spin_wait_delay'; |
| 23 |
--enable_warnings |
| 24 |
|
| 25 |
# |
| 26 |
# show that it's writable |
| 27 |
# |
| 28 |
set global innodb_spin_wait_delay=10; |
| 29 |
select @@global.innodb_spin_wait_delay; |
| 30 |
--disable_warnings |
| 31 |
select * from performance_schema.global_variables where variable_name='innodb_spin_wait_delay'; |
| 32 |
select * from performance_schema.session_variables where variable_name='innodb_spin_wait_delay'; |
| 33 |
--enable_warnings |
| 34 |
--error ER_GLOBAL_VARIABLE |
| 35 |
set session innodb_spin_wait_delay=1; |
| 36 |
|
| 37 |
# |
| 38 |
# check the default value |
| 39 |
# |
| 40 |
set global innodb_spin_wait_delay=DEFAULT; |
| 41 |
select @@global.innodb_spin_wait_delay; |
| 42 |
|
| 43 |
# |
| 44 |
# valid values |
| 45 |
# |
| 46 |
set global innodb_spin_wait_delay=0; |
| 47 |
select @@global.innodb_spin_wait_delay; |
| 48 |
set global innodb_spin_wait_delay=65535; |
| 49 |
select @@global.innodb_spin_wait_delay; |
| 50 |
set global innodb_spin_wait_delay=4294967295; |
| 51 |
select @@global.innodb_spin_wait_delay; |
| 52 |
|
| 53 |
# |
| 54 |
# incorrect types |
| 55 |
# |
| 56 |
--error ER_WRONG_TYPE_FOR_VAR |
| 57 |
set global innodb_spin_wait_delay=1.1; |
| 58 |
--error ER_WRONG_TYPE_FOR_VAR |
| 59 |
set global innodb_spin_wait_delay=1e1; |
| 60 |
--error ER_WRONG_TYPE_FOR_VAR |
| 61 |
set global innodb_spin_wait_delay="foo"; |
| 62 |
--error ER_WRONG_TYPE_FOR_VAR |
| 63 |
set global innodb_spin_wait_delay=' '; |
| 64 |
select @@global.innodb_spin_wait_delay; |
| 65 |
--error ER_WRONG_TYPE_FOR_VAR |
| 66 |
set global innodb_spin_wait_delay=" "; |
| 67 |
select @@global.innodb_spin_wait_delay; |
| 68 |
set global innodb_spin_wait_delay=-7; |
| 69 |
select @@global.innodb_spin_wait_delay; |
| 70 |
set global innodb_spin_wait_delay=-1024; |
| 71 |
select @@global.innodb_spin_wait_delay; |
| 72 |
--disable_warnings |
| 73 |
select * from performance_schema.global_variables where variable_name='innodb_spin_wait_delay'; |
| 74 |
--enable_warnings |
| 75 |
|
| 76 |
# |
| 77 |
# Check for out of bounds |
| 78 |
# |
| 79 |
|
| 80 |
# With a 64 bit mysqld:18446744073709551615,with a 32 bit mysqld: 4294967295 |
| 81 |
--disable_warnings |
| 82 |
SET @@global.innodb_spin_wait_delay = 4294967296; |
| 83 |
--enable_warnings |
| 84 |
SELECT @@global.innodb_spin_wait_delay IN (4294967296,4294967295); |
| 85 |
|
| 86 |
--disable_warnings |
| 87 |
SET @@global.innodb_spin_wait_delay = 12345678901; |
| 88 |
--enable_warnings |
| 89 |
SELECT @@global.innodb_spin_wait_delay IN (12345678901,4294967295); |
| 90 |
|
| 91 |
--disable_warnings |
| 92 |
SET @@global.innodb_spin_wait_delay = 18446744073709551615; |
| 93 |
--enable_warnings |
| 94 |
SELECT @@global.innodb_spin_wait_delay IN (18446744073709551615,4294967295); |
| 95 |
|
| 96 |
# |
| 97 |
# cleanup |
| 98 |
# |
| 99 |
SET @@global.innodb_spin_wait_delay = @start_global_value; |
| 100 |
SELECT @@global.innodb_spin_wait_delay; |