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

Permit to have MySQL driver and MariaDB driver in same classpath

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0-RC, 1.5.9
    • Other
    • None

    Description

      MariaDB driver accept connection string begining with "jdbc:mariadb:" and "jdbc:mysql:".
      so when DriverManager call registred driver for an url, if MySQL driver is in classpath, Driver will randomly return a MySQL or MariaDB Driver.

      Goal is to permit having MariaDB and MySQL driver are in same classpath for good reason (testing, benchmark, ...).

      Driver.acceptsUrl(String url) must return false for connection string beginning with "jdbc:mysql" AND containing "disableMariaDbDriver".

      So when MySQL AND MariaDB drivers are on same classpath, DriverManager.getConnection("jdbc:mysql://localhost/db?user=root&disableMariaDbDriver") will always return a connection using MySQL driver

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              diego dupin Diego Dupin
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.