Bug #115056 ssl_session_cache_timeout max value is set to 84600 instead of 86400s(1 day)
Submitted: 18 May 2024 23:55 Modified: 20 May 2024 4:53
Reporter: Musab Kilic (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:8.0.37 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution, typo

[18 May 2024 23:55] Musab Kilic
Description:
ssl_session_cache_timeout system variable could only take values between 0-84600, and it is stated this is equivalent to the number of seconds in a day both in the code and the documentation. However, this is a typo as the correct  number should be 86400. 

https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_ssl_session_ca...

How to repeat:
Using a command line argument --ssl_session_cache_timeout 84601(or anything 84601-86400) will reveal this.

Suggested fix:
The code checking the range is written here:
sql/ssl_init_callback.cc
router/src/routing/src/plugin_config.cc

and the corresponding testing code
router/tests/component/test_routing.cc
mysql-test/suite/sys_vars/t/ssl_session_cache_timeout_basic.test
mysql-test/suite/sys_vars/r/ssl_session_cache_timeout_basic.result

My suggested fix is to just change this value from 84600 to 86400, but if it is not preferred for consistency, changing the comment "equivalent to 1 day" is enough.
[20 May 2024 4:53] MySQL Verification Team
Hello Musab Kilic,

Thank you for the report and feedback.

regards,
Umesh
[29 May 2024 14:22] Musab Kilic
commit patch for fixing the bug

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: 0001-Bug-115056-ssl_session_cache_timeout-max-value-is-se.patch (application/octet-stream, text), 9.08 KiB.