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

MySQLDataSource implementation discards properties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.5
    • Fix Version/s: 1.1.8
    • Component/s: None
    • Labels:
      None
    • Environment:
      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

              Assignee:
              massimo.siani Massimo Siani (Inactive)
              Reporter:
              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.