exasol / virtual-schema-common-jdbc

Common module for JDBC-based access from Virtual Schemas
MIT License
0 stars 1 forks source link

Create tickets for affected virtual schemas #127

Closed ckunki closed 1 year ago

ckunki commented 1 year ago

With release 8.0.31 of the jdbc connector / driver for mysql the artifact mysql:mysql-connector-java:jar:8.0.31 has been relocated to com.mysql:mysql-connector-j:jar:8.0.31: MySQL Connector/Jartifacts moved to reverse-DNS compliant Maven 2+ coordinates. This also changes the name of the jar file containing the jdbc driver from mysql-connector-java.jar to mysql-connector-j.jar.

The corresponding virtual schema (in this case mysql-virtual-schema) must use the correct jar name in two places Place Example for mysql-virtual-schema
when generating the adapter script ✔️ fine, uses constant MySQLVirtualSchemaIntegrationTestSetup.JDBC_DRIVER_NAME
in file settings.cfg :x: outdated, file settings.cfg provided as static resource

Content of static resource src/test/resources/settings.cfg :

DRIVERNAME=MYSQL
JAR=mysql-connector-java.jar
DRIVERMAIN=com.mysql.jdbc.Driver
PREFIX=jdbc:mysql:
NOSECURITY=YES
FETCHSIZE=100000
INSERTSIZE=-1

mysql-virtual-schema will therefore replace the resource by a string generated dynamically with to contain the correct name of the jar file:

bucket.uploadStringContent(JDBC_DRIVER_CONFIGURATION_FILE_CONTENT,
                    "drivers/jdbc/" + JDBC_DRIVER_CONFIGURATION_FILE_NAME);

The current ticket additionally requests to create tickets for all JDBC based virtual schemas to follow this pattern, too.