mirror of https://github.com/apache/druid.git
deps: upgrade mysql-connector-java to v5.1.49 (#12704)
This commit is contained in:
parent
dbd45daf33
commit
068bea6334
|
@ -99,7 +99,7 @@ public final class ConnectionUriUtils
|
|||
}
|
||||
catch (ClassNotFoundException notFoundMaria2x) {
|
||||
throw new RuntimeException(
|
||||
"Failed to find MySQL driver class. Please check the MySQL connector version 5.1.48 is in the classpath",
|
||||
"Failed to find MySQL driver class. Please check the MySQL connector version 5.1.49 is in the classpath",
|
||||
notFoundMysql
|
||||
);
|
||||
}
|
||||
|
|
|
@ -22,10 +22,10 @@ FROM $DRUID_RELEASE
|
|||
|
||||
WORKDIR /opt/druid/extensions/mysql-metadata-storage
|
||||
|
||||
ARG MYSQL_URL=https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.48/mysql-connector-java-5.1.48.jar
|
||||
ARG MYSQL_JAR=mysql-connector-java-5.1.48.jar
|
||||
# https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.48/mysql-connector-java-5.1.48.jar.sha1
|
||||
ARG MYSQL_SHA=9140be77aafa5050bf4bb936d560cbacb5a6b5c1
|
||||
ARG MYSQL_URL=https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.49/mysql-connector-java-5.1.49.jar
|
||||
ARG MYSQL_JAR=mysql-connector-java-5.1.49.jar
|
||||
# https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.49/mysql-connector-java-5.1.49.jar.sha1
|
||||
ARG MYSQL_SHA=cf76d2e4c9c3782a85c15c87bec5772b34ffd0e5
|
||||
|
||||
RUN wget -q ${MYSQL_URL} \
|
||||
&& echo "${MYSQL_SHA} ${MYSQL_JAR}" | sha1sum -c \
|
||||
|
|
|
@ -585,7 +585,7 @@ These properties do not apply to metadata storage connections.
|
|||
|Property|Possible Values|Description|Default|
|
||||
|--------|---------------|-----------|-------|
|
||||
|`druid.access.jdbc.enforceAllowedProperties`|Boolean|When true, Druid applies `druid.access.jdbc.allowedProperties` to JDBC connections starting with `jdbc:postgresql:`, `jdbc:mysql:`, or `jdbc:mariadb:`. When false, Druid allows any kind of JDBC connections without JDBC property validation. This config is for backward compatibility especially during upgrades since enforcing allow list can break existing ingestion jobs or lookups based on JDBC. This config is deprecated and will be removed in a future release.|true|
|
||||
|`druid.access.jdbc.allowedProperties`|List of JDBC properties|Defines a list of allowed JDBC properties. Druid always enforces the list for all JDBC connections starting with `jdbc:postgresql:`, `jdbc:mysql:`, and `jdbc:mariadb:` if `druid.access.jdbc.enforceAllowedProperties` is set to true.<br/><br/>This option is tested against MySQL connector 5.1.48, MariaDB connector 2.7.4, and PostgreSQL connector 42.2.14. Other connector versions might not work.|["useSSL", "requireSSL", "ssl", "sslmode"]|
|
||||
|`druid.access.jdbc.allowedProperties`|List of JDBC properties|Defines a list of allowed JDBC properties. Druid always enforces the list for all JDBC connections starting with `jdbc:postgresql:`, `jdbc:mysql:`, and `jdbc:mariadb:` if `druid.access.jdbc.enforceAllowedProperties` is set to true.<br/><br/>This option is tested against MySQL connector 5.1.49, MariaDB connector 2.7.4, and PostgreSQL connector 42.2.14. Other connector versions might not work.|["useSSL", "requireSSL", "ssl", "sslmode"]|
|
||||
|`druid.access.jdbc.allowUnknownJdbcUrlFormat`|Boolean|When false, Druid only accepts JDBC connections starting with `jdbc:postgresql:` or `jdbc:mysql:`. When true, Druid allows JDBC connections to any kind of database, but only enforces `druid.access.jdbc.allowedProperties` for PostgreSQL and MySQL/MariaDB.|true|
|
||||
|
||||
|
||||
|
|
|
@ -34,10 +34,10 @@ This extension can use Oracle's MySQL JDBC driver which is not included in the D
|
|||
install it separately. There are a few ways to obtain this library:
|
||||
|
||||
- It can be downloaded from the MySQL site at: https://dev.mysql.com/downloads/connector/j/
|
||||
- It can be fetched from Maven Central at: https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.48/mysql-connector-java-5.1.48.jar
|
||||
- It can be fetched from Maven Central at: https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.49/mysql-connector-java-5.1.49.jar
|
||||
- It may be available through your package manager, e.g. as `libmysql-java` on APT for a Debian-based OS
|
||||
|
||||
This fetches the MySQL connector JAR file with a name like `mysql-connector-java-5.1.48.jar`.
|
||||
This fetches the MySQL connector JAR file with a name like `mysql-connector-java-5.1.49.jar`.
|
||||
|
||||
Copy or symlink this file inside the folder `extensions/mysql-metadata-storage` under the distribution root directory.
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ public class MySQLConnector extends SQLMetadataConnector
|
|||
if (failIfNotFound) {
|
||||
throw new ISE(e, "Could not find %s on the classpath. The MySQL Connector library is not included in the Druid "
|
||||
+ "distribution but is required to use MySQL. Please download a compatible library (for example "
|
||||
+ "'mysql-connector-java-5.1.48.jar') and place it under 'extensions/mysql-metadata-storage/'. See "
|
||||
+ "'mysql-connector-java-5.1.49.jar') and place it under 'extensions/mysql-metadata-storage/'. See "
|
||||
+ "https://druid.apache.org/downloads for more details.",
|
||||
className
|
||||
);
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -98,7 +98,7 @@
|
|||
<jackson.version>2.10.5.20201202</jackson.version>
|
||||
<codehaus.jackson.version>1.9.13</codehaus.jackson.version>
|
||||
<log4j.version>2.17.1</log4j.version>
|
||||
<mysql.version>5.1.48</mysql.version>
|
||||
<mysql.version>5.1.49</mysql.version>
|
||||
<mariadb.version>2.7.3</mariadb.version>
|
||||
<netty3.version>3.10.6.Final</netty3.version>
|
||||
<netty4.version>4.1.68.Final</netty4.version>
|
||||
|
|
Loading…
Reference in New Issue