[
https://issues.apache.org/jira/browse/DRILL-4369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15589518#comment-15589518
]
ASF GitHub Bot commented on DRILL-4369:
---------------------------------------
Github user julienledem commented on a diff in the pull request:
https://github.com/apache/drill/pull/622#discussion_r84139699
--- Diff:
exec/jdbc-all/src/test/java/org/apache/drill/jdbc/ITTestShadedJar.java ---
@@ -67,6 +70,33 @@ public void run() {
}
@Test
+ public void testDatabaseVersion() throws Exception {
+
+ // print class path for debugging
+ System.out.println("java.class.path:");
+ System.out.println(System.getProperty("java.class.path"));
+
+ final URLClassLoader loader = (URLClassLoader)
ClassLoader.getSystemClassLoader();
+ Method method = URLClassLoader.class.getDeclaredMethod("addURL",
URL.class);
+ method.setAccessible(true);
+ method.invoke(loader, getJdbcUrl());
+
+ Class<?> clazz = loader.loadClass("org.apache.drill.jdbc.Driver");
+ try {
+ Driver driver = (Driver) clazz.newInstance();
+ try (Connection c =
driver.connect("jdbc:drill:drillbit=localhost:31010", null)) {
+ DatabaseMetaData metadata = c.getMetaData();
+ assertEquals("Apache Drill JDBC Driver", metadata.getDriverName());
+ assertEquals("Apache Drill Server",
metadata.getDatabaseProductName());
+ //assertEquals()
+ }
+ } catch (Exception ex) {
+ throw ex;
--- End diff --
needed?
> Database driver fails to report any major or minor version information
> ----------------------------------------------------------------------
>
> Key: DRILL-4369
> URL: https://issues.apache.org/jira/browse/DRILL-4369
> Project: Apache Drill
> Issue Type: Bug
> Components: Client - JDBC
> Affects Versions: 1.4.0
> Reporter: N Campbell
>
> Using Apache 1.4 Drill
> The DatabaseMetadata.getters to obtain the Major and Minor versions of the
> server or JDBC driver return 0 instead of 1.4.
> This prevents an application from dynamically adjusting how it interacts
> based on which version of Drill a connection is accessing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)