| 1 |
SET @start_global_value = @@global.flush_time; |
| 2 |
|
| 3 |
# |
| 4 |
# exists as global only |
| 5 |
# |
| 6 |
select @@global.flush_time; |
| 7 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 8 |
select @@session.flush_time; |
| 9 |
show global variables like 'flush_time'; |
| 10 |
show session variables like 'flush_time'; |
| 11 |
--disable_warnings |
| 12 |
select * from performance_schema.global_variables where variable_name='flush_time'; |
| 13 |
select * from performance_schema.session_variables where variable_name='flush_time'; |
| 14 |
--enable_warnings |
| 15 |
|
| 16 |
# |
| 17 |
# show that it's writable |
| 18 |
# |
| 19 |
set global flush_time=1; |
| 20 |
select @@global.flush_time; |
| 21 |
--error ER_GLOBAL_VARIABLE |
| 22 |
set session flush_time=1; |
| 23 |
|
| 24 |
# |
| 25 |
#check the default value |
| 26 |
# |
| 27 |
|
| 28 |
SET global flush_time = DEFAULT; |
| 29 |
SELECT @@global.flush_time; |
| 30 |
|
| 31 |
# |
| 32 |
# invalid values |
| 33 |
# |
| 34 |
|
| 35 |
SET @@global.flush_time = -1024; |
| 36 |
SELECT @@global.flush_time; |
| 37 |
|
| 38 |
|
| 39 |
# incorrect types |
| 40 |
# |
| 41 |
--error ER_WRONG_TYPE_FOR_VAR |
| 42 |
set global flush_time=1.1; |
| 43 |
--error ER_WRONG_TYPE_FOR_VAR |
| 44 |
set global flush_time=1e1; |
| 45 |
--error ER_WRONG_TYPE_FOR_VAR |
| 46 |
set global flush_time="foo"; |
| 47 |
--error ER_WRONG_TYPE_FOR_VAR |
| 48 |
set global flush_time=" "; |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
# |
| 53 |
# min/max values |
| 54 |
# |
| 55 |
set global flush_time=0; |
| 56 |
select @@global.flush_time; |
| 57 |
set global flush_time=cast(-1 as unsigned int); |
| 58 |
select @@global.flush_time; |
| 59 |
|
| 60 |
SET @@global.flush_time = @start_global_value; |