Bug #83508 MysqlDataSource excludes login timeouts
Submitted: 24 Oct 2016 23:31 Modified: 25 Oct 2016 10:53
Reporter: liam christopher Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[24 Oct 2016 23:31] liam christopher
Description:
Connector/J StandardSocketFactory appears at first glance to use the login timeout. But the value is picked up here, which seemed a little odd because using the MysqlDataSource rather than URL-based (driver) configuration could be excluded. But maybe the MysqlDataSource.setLoginTimeout() does the right thing and calls DriverManager.setLoginTimeout().

Referenced from this comment for configuring HikariCP, which has the proper links.

https://github.com/brettwooldridge/HikariCP/issues/754#issuecomment-255532722

How to repeat:
Code is not implemented here:
https://github.com/mysql/mysql-connector-j/blob/5.1.38/src/com/mysql/jdbc/jdbc2/optional/M...

Suggested fix:
Have the setLoginTimeout() actually set the value.
[25 Oct 2016 10:53] Chiranjeevi Battula
Hello liam christopher,

Thank you for the bug report.
Verified based on internal discussion with dev's.

Thanks,
Chiranjeevi.