RaigorJiang commented on a change in pull request #11185:
URL: https://github.com/apache/shardingsphere/pull/11185#discussion_r664999488
##########
File path:
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/decorator/HikariJDBCParameterDecorator.java
##########
@@ -27,23 +28,33 @@
@Override
public HikariDataSource decorate(final HikariDataSource dataSource) {
- dataSource.getDataSourceProperties().setProperty("useServerPrepStmts",
Boolean.TRUE.toString());
- dataSource.getDataSourceProperties().setProperty("cachePrepStmts",
Boolean.TRUE.toString());
- dataSource.getDataSourceProperties().setProperty("prepStmtCacheSize",
"200000");
-
dataSource.getDataSourceProperties().setProperty("prepStmtCacheSqlLimit",
"2048");
-
dataSource.getDataSourceProperties().setProperty("useLocalSessionState",
Boolean.TRUE.toString());
-
dataSource.getDataSourceProperties().setProperty("rewriteBatchedStatements",
Boolean.TRUE.toString());
-
dataSource.getDataSourceProperties().setProperty("cacheResultSetMetadata",
Boolean.FALSE.toString());
-
dataSource.getDataSourceProperties().setProperty("cacheServerConfiguration",
Boolean.TRUE.toString());
-
dataSource.getDataSourceProperties().setProperty("elideSetAutoCommits",
Boolean.TRUE.toString());
- dataSource.getDataSourceProperties().setProperty("maintainTimeStats",
Boolean.FALSE.toString());
-
dataSource.getDataSourceProperties().setProperty("netTimeoutForStreamingResults",
"0");
- dataSource.getDataSourceProperties().setProperty("tinyInt1isBit",
Boolean.FALSE.toString());
+ addJDBCProperty(dataSource, "useServerPrepStmts",
Boolean.TRUE.toString());
+ addJDBCProperty(dataSource, "useServerPrepStmts",
Boolean.TRUE.toString());
+ addJDBCProperty(dataSource, "cachePrepStmts", Boolean.TRUE.toString());
+ addJDBCProperty(dataSource, "prepStmtCacheSize", "200000");
+ addJDBCProperty(dataSource, "prepStmtCacheSqlLimit", "2048");
+ addJDBCProperty(dataSource, "useLocalSessionState",
Boolean.TRUE.toString());
+ addJDBCProperty(dataSource, "rewriteBatchedStatements",
Boolean.TRUE.toString());
+ addJDBCProperty(dataSource, "cacheResultSetMetadata",
Boolean.FALSE.toString());
+ addJDBCProperty(dataSource, "cacheServerConfiguration",
Boolean.TRUE.toString());
+ addJDBCProperty(dataSource, "elideSetAutoCommits",
Boolean.TRUE.toString());
+ addJDBCProperty(dataSource, "maintainTimeStats",
Boolean.FALSE.toString());
+ addJDBCProperty(dataSource, "netTimeoutForStreamingResults", "0");
+ addJDBCProperty(dataSource, "tinyInt1isBit", Boolean.FALSE.toString());
+ addJDBCProperty(dataSource, "useSSL", Boolean.FALSE.toString());
+ addJDBCProperty(dataSource, "serverTimezone", "UTC");
Review comment:
Thanks @TeslaCN .
I have read `parseURL` method of class `NonRegisteringDriver` too. So I add
a 'url check' in `addJDBCProperty()`, please have a see.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]