Details

    Description

      In our project we are using Connection.getMetadata().getURL() to retrieve the initial JDBC URL, e.g. jdbc:mysql://localhost:3306/etc.

      Starting with version 2.2.1 the behavior has changed. The URL is set once again, and, despite its name, it's not the initial URL anymore. What we get is apparently a normalized URL, e.g. jdbc:mariadb://address=(host=localhost)(port=3306)(type=master)/etc.

      UrlParser.parseInternal(...)

      if (properties != null && !properties.isEmpty()) urlParser.setInitialUrl();
      

      the line on GitHub

      However, we still need the actual initial URL, not the "normalized" one.

      So, the question is, whether it's the expected behavior, and if yes, how do I retrieve the initial URL using the JDBC API?

      Attachments

        Activity

          sjbog Bogdan S added a comment -

          PlayFramework also uses

          Connection.getMetadata().getURL()

          Commit that broke the initial url:
          https://github.com/MariaDB/mariadb-connector-j/commit/4d3e53a15b0e9bca415e079b5f6c5dad4f7241dd#diff-da03d8bdd67b9c8045e184aa256f365eL778

          sjbog Bogdan S added a comment - PlayFramework also uses Connection.getMetadata().getURL() Commit that broke the initial url: https://github.com/MariaDB/mariadb-connector-j/commit/4d3e53a15b0e9bca415e079b5f6c5dad4f7241dd#diff-da03d8bdd67b9c8045e184aa256f365eL778
          diego dupin Diego Dupin added a comment -

          corrected developpement version:

          <repositories>
              <repository>
                  <id>sonatype-nexus-snapshots</id>
                  <name>Sonatype Nexus Snapshots</name>
                  <url>https://oss.sonatype.org/content/repositories/snapshots</url>
              </repository>
          </repositories>
           
          <dependencies>
              <dependency>
                  <groupId>org.mariadb.jdbc</groupId>
                  <artifactId>mariadb-java-client</artifactId>
                  <version>2.2.2-SNAPSHOT</version>
              </dependency>
          </dependencies>
          

          will be released in next corrective release

          diego dupin Diego Dupin added a comment - corrected developpement version: <repositories> <repository> <id>sonatype-nexus-snapshots</id> <name>Sonatype Nexus Snapshots</name> <url>https: //oss.sonatype.org/content/repositories/snapshots</url> </repository> </repositories>   <dependencies> <dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> <version> 2.2 . 2 -SNAPSHOT</version> </dependency> </dependencies> will be released in next corrective release

          Great, thank you!

          rtrapickin Roman Trapickin added a comment - Great, thank you!

          People

            diego dupin Diego Dupin
            rtrapickin Roman Trapickin
            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.