| 1 |
--source include/not_embedded.inc |
| 2 |
|
| 3 |
# |
| 4 |
# Only global |
| 5 |
# |
| 6 |
|
| 7 |
select @@global.host_cache_size; |
| 8 |
|
| 9 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 10 |
select @@session.host_cache_size; |
| 11 |
|
| 12 |
show global variables like 'host_cache_size'; |
| 13 |
|
| 14 |
show session variables like 'host_cache_size'; |
| 15 |
|
| 16 |
select * from information_schema.global_variables |
| 17 |
where variable_name='host_cache_size'; |
| 18 |
|
| 19 |
select * from information_schema.session_variables |
| 20 |
where variable_name='host_cache_size'; |
| 21 |
|
| 22 |
# |
| 23 |
# Read-Write |
| 24 |
# |
| 25 |
|
| 26 |
set global host_cache_size=1; |
| 27 |
select @@global.host_cache_size; |
| 28 |
|
| 29 |
set global host_cache_size=12; |
| 30 |
select @@global.host_cache_size; |
| 31 |
|
| 32 |
set global host_cache_size=0; |
| 33 |
select @@global.host_cache_size; |
| 34 |
|
| 35 |
--error ER_GLOBAL_VARIABLE |
| 36 |
set session host_cache_size=1; |
| 37 |
|
| 38 |
# Restore default |
| 39 |
set global host_cache_size=123; |
| 40 |
select @@global.host_cache_size; |
| 41 |
|