sandynz commented on code in PR #20507:
URL: https://github.com/apache/shardingsphere/pull/20507#discussion_r954618316
##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/datasource/MySQLJdbcQueryPropertiesExtension.java:
##########
@@ -17,22 +17,39 @@
package org.apache.shardingsphere.data.pipeline.mysql.datasource;
+import lombok.extern.slf4j.Slf4j;
import
org.apache.shardingsphere.data.pipeline.spi.datasource.JdbcQueryPropertiesExtension;
import java.util.Properties;
/**
* MySQL JDBC query properties extension.
*/
+@Slf4j
public final class MySQLJdbcQueryPropertiesExtension implements
JdbcQueryPropertiesExtension {
+ private static Class<?> mysqlDriverClass;
+
+ static {
+ try {
+ mysqlDriverClass =
MySQLJdbcQueryPropertiesExtension.class.getClassLoader().loadClass("com.mysql.jdbc.Driver");
+ } catch (ClassNotFoundException e) {
+ log.warn("not find com.mysql.jdbc.Driver class");
+ }
+ }
Review Comment:
1, Could we just output MySQL version here? And we could set different
`zeroDateTimeBehavior` value based on MySQL version.
2, `ClassNotFoundException e` could be `final ClassNotFoundException ex`
--
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]