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

MySQLDataSource implementation discards properties

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.5
    • 1.1.8
    • None
    • None
    • N/A

    Description

      The implementation of method getConnection(username, password) completely discards the properties by passing a new empty properties object instead of using the one set externally by the connection pool (info).

      We use Oracle UCP as our connection pool and we set connection properties like this:

      PoolDataSource pds = oracle.ucp.jdbc.PoolDataSourceFactory.getPoolDataSource();
      pds.setURL("jdbc:mariadb://127.0.0.1:3306/test");
      pds.setUser("user");
      pds.setPassword("pass");
      pds.setConnectionFactoryClassName("org.mariadb.jdbc.MySQLDataSource");

      Properties p = new Properties();
      p.setProperty("properties", "useFractionalSeconds=true");
      pds.setConnectionFactoryProperties(p);

      Connection c = pds.getConnection();

      Here the property 'useFractionalSeconds' is never set on the new connection since it's discarded by the datasource implementation...

      Attachments

        Issue Links

          Activity

            People

              massimo.siani Massimo Siani (Inactive)
              cbourque Christian Bourque
              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.