[CONJ-81] MySQLDataSource implementation discards properties Created: 2014-01-09  Updated: 2014-10-21  Resolved: 2014-10-21

Status: Closed
Project: MariaDB Connector/J
Component/s: None
Affects Version/s: 1.1.5
Fix Version/s: 1.1.8

Type: Bug Priority: Major
Reporter: Christian Bourque Assignee: Massimo Siani (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

N/A


Issue Links:
Duplicate
is duplicated by CONJ-105 getConnection(String, String) ignores... Closed

 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...


Generated at Thu Feb 08 03:13:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.