Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-654

DatabaseMetaData.getDriverName() returns connector/J with a lowercase c

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 2.3.0
    • 1.8.0, 2.4.0
    • metadata
    • None

    Description

      The following java code returns the string "Driver Name = MariaDB connector/J" instead of the correct "Driver Name = MariaDB Connector/J"

      import java.sql.Connection;
      import java.sql.DatabaseMetaData;
      import java.sql.DriverManager;
       
      public class p2 {
      public static void main(String[] args) throws Exception {
         Connection conn = DriverManager.getConnection("jdbc:mariadb://moe:10309/test", "user", "pwd");
         DatabaseMetaData metadata = conn.getMetaData();
         System.out.println("Driver Name = " + metadata.getDriverName());
         }
      }
      

      Attachments

        Activity

          diego dupin Diego Dupin added a comment -

          Changed for next version. Check that hibernate doesn't rely on name for automatic Dialect resolver, and it rely on first part only (that getDriverName start with "MariaDB"

          diego dupin Diego Dupin added a comment - Changed for next version. Check that hibernate doesn't rely on name for automatic Dialect resolver, and it rely on first part only (that getDriverName start with "MariaDB"

          Many other libraries and products do not yet know Database Type = MariaDB (from metadata point of view) and fail to work with driver 2.4.0 because of change made in org.mariadb.jdbc.MariaDbDatabaseMetaData#getDatabaseProductName (Spring Batch, JQM, etc.)
          This means that for many projects update of MariaDB driver means an upgrade of other libraries. That can be too hard to complete.

          Is it possible to get some flag to preserve compatibility with other 3rd party libraries? Probably, minor release with such a feature would be helpful.

          mtykhenko Maksym Tykhenko added a comment - Many other libraries and products do not yet know Database Type = MariaDB (from metadata point of view) and fail to work with driver 2.4.0 because of change made in org.mariadb.jdbc.MariaDbDatabaseMetaData#getDatabaseProductName (Spring Batch, JQM, etc.) This means that for many projects update of MariaDB driver means an upgrade of other libraries. That can be too hard to complete. Is it possible to get some flag to preserve compatibility with other 3rd party libraries? Probably, minor release with such a feature would be helpful.
          diego dupin Diego Dupin added a comment -

          Hi mtykhenko, an option in 2.4.1 named "useMysqlMetadata" permit to force databaseMetaData.getDatabaseProductName() to return "MySQL" (default now return "MariaDB" or "MySQL" according to server type) . This option permits compatibility with frameworks that doesn't support "MariaDB" type.

          diego dupin Diego Dupin added a comment - Hi mtykhenko , an option in 2.4.1 named "useMysqlMetadata" permit to force databaseMetaData.getDatabaseProductName() to return "MySQL" (default now return "MariaDB" or "MySQL" according to server type) . This option permits compatibility with frameworks that doesn't support "MariaDB" type.

          People

            diego dupin Diego Dupin
            karlsson Anders Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.