I have an issue when upgrading Druid from version 1.2.11 to 1.2.18.  The new version adds socketTimeout in DruidDataSource.java and the default value is 10_000.
I think it is the reason of exception below:
The last packet successfully received from the server was 10,036 milliseconds ago. The last packet sent successfully to the server was 10,036 milliseconds ago.
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:100)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439)
But I think the default socketTimeout of MySQL JDBC is 0 (Timeout, specified in milliseconds, on network socket operations. Value "0" means no timeout).
How can I set socketTimeout in Druid 1.2.18 to no timeout? Please help.