clintropolis commented on a change in pull request #11402:
URL: https://github.com/apache/druid/pull/11402#discussion_r664916372



##########
File path: 
extensions-core/mysql-metadata-storage/src/main/java/org/apache/druid/firehose/sql/MySQLFirehoseDatabaseConnector.java
##########
@@ -43,17 +40,21 @@
 {
   private final DBI dbi;
   private final MetadataStorageConnectorConfig connectorConfig;
+  @Nullable
+  private final String driverClassName;
 
   @JsonCreator
   public MySQLFirehoseDatabaseConnector(
       @JsonProperty("connectorConfig") MetadataStorageConnectorConfig 
connectorConfig,
+      @JsonProperty("driverClassName") @Nullable String driverClassName,
       @JacksonInject JdbcAccessSecurityConfig securityConfig
   )
   {
     this.connectorConfig = connectorConfig;
+    this.driverClassName = driverClassName;

Review comment:
       this I think should be happening in `ConnectionUriUtils` where if only 
the mysql driver is loaded then it will fail to parse the mariadb jdbc uri. I 
did change this though so that if `driverClassName` is null, and if the uri 
starts with the mariadb prefix, then it will default to the mariadb driver.
   
   Or you are you imagining a case where both drivers are loaded so that one is 
used for validation but a separate is used for the actual driver? I guess that 
could happen, and would certainly be strange, but isn't really a vulnerability 
I think at least because you would still need access to the Druid configuration 
to make a more permissive configuration for validation than the actual driver.




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to