| 1 |
select @@global.host_cache_size; |
| 2 |
@@global.host_cache_size |
| 3 |
123 |
| 4 |
select @@session.host_cache_size; |
| 5 |
ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable |
| 6 |
show global variables like 'host_cache_size'; |
| 7 |
Variable_name Value |
| 8 |
host_cache_size 123 |
| 9 |
show session variables like 'host_cache_size'; |
| 10 |
Variable_name Value |
| 11 |
host_cache_size 123 |
| 12 |
select * from information_schema.global_variables |
| 13 |
where variable_name='host_cache_size'; |
| 14 |
VARIABLE_NAME VARIABLE_VALUE |
| 15 |
HOST_CACHE_SIZE 123 |
| 16 |
select * from information_schema.session_variables |
| 17 |
where variable_name='host_cache_size'; |
| 18 |
VARIABLE_NAME VARIABLE_VALUE |
| 19 |
HOST_CACHE_SIZE 123 |
| 20 |
set global host_cache_size=1; |
| 21 |
select @@global.host_cache_size; |
| 22 |
@@global.host_cache_size |
| 23 |
1 |
| 24 |
set global host_cache_size=12; |
| 25 |
select @@global.host_cache_size; |
| 26 |
@@global.host_cache_size |
| 27 |
12 |
| 28 |
set global host_cache_size=0; |
| 29 |
select @@global.host_cache_size; |
| 30 |
@@global.host_cache_size |
| 31 |
0 |
| 32 |
set session host_cache_size=1; |
| 33 |
ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable and should be set with SET GLOBAL |
| 34 |
set global host_cache_size=123; |
| 35 |
select @@global.host_cache_size; |
| 36 |
@@global.host_cache_size |
| 37 |
123 |