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

'mariadb' alias doesn't work with HA mode

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.3.0, 1.3.2, 1.3.1
    • 1.3.3
    • Other
    • None

    Description

      Hi,
      I'm going to use the MariaDB Connector/J with failover options,
      but when I use URL format like 'jdbc:mariadb:failover://', UrlParser throws an exception.
      (Connector/J 1.3.2)

      java.sql.SQLException: url parameter error '' is a unknown parameter in the url jdbc:mysql::failover://192.168.33.10:3306,192.168.33.11:3306/testj
              at org.mariadb.jdbc.UrlParser.parseInternal(UrlParser.java:193) ~[mariadb-java-client-1.3.2.jar:na]
              at org.mariadb.jdbc.UrlParser.parse(UrlParser.java:146) ~[mariadb-java-client-1.3.2.jar:na]
              at org.mariadb.jdbc.Driver.connect(Driver.java:95) ~[mariadb-java-client-1.3.2.jar:na]
      ...

      'jdbc:mysql:failover://' works, so it’s not a big problem, but I think it should be fixed.

      I think this is the cause:
      https://github.com/MariaDB/mariadb-connector-j/blob/1.3.2/src/main/java/org/mariadb/jdbc/UrlParser.java#L146

      I'll send a pull request to fix this on GitHub later.

      Thanks.

      Attachments

        Activity

          People

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