| 1 |
# |
| 2 |
# WL#13075: Support TLS session reuse in the C API |
| 3 |
# |
| 4 |
# Check the default value |
| 5 |
SELECT @@GLOBAL.ssl_session_cache_timeout; |
| 6 |
@@GLOBAL.ssl_session_cache_timeout |
| 7 |
300 |
| 8 |
300 Expected |
| 9 |
# Check if value can set |
| 10 |
SET @@GLOBAL.ssl_session_cache_timeout=400; |
| 11 |
SELECT @@GLOBAL.ssl_session_cache_timeout; |
| 12 |
@@GLOBAL.ssl_session_cache_timeout |
| 13 |
400 |
| 14 |
400 expected |
| 15 |
# Check if the value in GLOBAL Table matches value in variable |
| 16 |
SELECT @@GLOBAL.ssl_session_cache_timeout = VARIABLE_VALUE |
| 17 |
FROM performance_schema.global_variables |
| 18 |
WHERE VARIABLE_NAME='ssl_session_cache_timeout'; |
| 19 |
@@GLOBAL.ssl_session_cache_timeout = VARIABLE_VALUE |
| 20 |
1 |
| 21 |
1 Expected |
| 22 |
SELECT @@GLOBAL.ssl_session_cache_timeout; |
| 23 |
@@GLOBAL.ssl_session_cache_timeout |
| 24 |
400 |
| 25 |
# Check if there's only one value in global_variables |
| 26 |
SELECT COUNT(VARIABLE_VALUE) |
| 27 |
FROM performance_schema.global_variables |
| 28 |
WHERE VARIABLE_NAME='ssl_session_cache_timeout'; |
| 29 |
COUNT(VARIABLE_VALUE) |
| 30 |
1 |
| 31 |
1 Expected |
| 32 |
# Check if accessing variable with and without GLOBAL point to same variable |
| 33 |
SELECT @@ssl_session_cache_timeout = @@GLOBAL.ssl_session_cache_timeout; |
| 34 |
@@ssl_session_cache_timeout = @@GLOBAL.ssl_session_cache_timeout |
| 35 |
1 |
| 36 |
# Check if ssl_session_cache_timeout can be accessed with @@ sign |
| 37 |
SELECT @@ssl_session_cache_timeout; |
| 38 |
@@ssl_session_cache_timeout |
| 39 |
400 |
| 40 |
SELECT @@local.ssl_session_cache_timeout; |
| 41 |
ERROR HY000: Variable 'ssl_session_cache_timeout' is a GLOBAL variable |
| 42 |
Expected error 'Variable is a GLOBAL variable' |
| 43 |
SELECT @@SESSION.ssl_session_cache_timeout; |
| 44 |
ERROR HY000: Variable 'ssl_session_cache_timeout' is a GLOBAL variable |
| 45 |
Expected error 'Variable is a GLOBAL variable' |
| 46 |
SELECT @@GLOBAL.ssl_session_cache_timeout; |
| 47 |
@@GLOBAL.ssl_session_cache_timeout |
| 48 |
400 |
| 49 |
400 Expected |
| 50 |
SELECT ssl_session_cache_timeout = @@SESSION.ssl_session_cache_timeout; |
| 51 |
ERROR HY000: Variable 'ssl_session_cache_timeout' is a GLOBAL variable |
| 52 |
# Set value to min |
| 53 |
SET @@GLOBAL.ssl_session_cache_timeout = 0; |
| 54 |
# Set value to max |
| 55 |
SET @@GLOBAL.ssl_session_cache_timeout = 84600; |
| 56 |
# Set value below min |
| 57 |
SET @@GLOBAL.ssl_session_cache_timeout = -1; |
| 58 |
Warnings: |
| 59 |
Warning 1292 Truncated incorrect ssl_session_cache_timeout value: '-1' |
| 60 |
# Set value above max |
| 61 |
SET @@GLOBAL.ssl_session_cache_timeout = 84600 + 1; |
| 62 |
Warnings: |
| 63 |
Warning 1292 Truncated incorrect ssl_session_cache_timeout value: '84601' |
| 64 |
# expect to be able to set it with step of 1 |
| 65 |
SET @@GLOBAL.ssl_session_cache_timeout = 300; |
| 66 |
SET @@GLOBAL.ssl_session_cache_timeout = 301; |
| 67 |
SET @@GLOBAL.ssl_session_cache_timeout = 299; |
| 68 |
# Cleanup |
| 69 |
SET @@GLOBAL.ssl_session_cache_timeout = default; |