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

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-RC, 1.5.9
    • Component/s: Other
    • Labels:
      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

              Assignee:
              diego dupin Diego Dupin
              Reporter:
              diego dupin Diego Dupin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: