Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.1.7
-
None
-
None
Description
I want to be able to determine whether or not a connection has been established with a certain optional property (useFractionalSeconds). I should be able to use connection.getClientInfo("useFractionalSeconds") to do this, but it looks like the properties are never populated.
org.mariadb.jdbc.MySQLConnection |
private MySQLConnection( MySQLProtocol protocol) {
|
this.protocol = protocol;
|
clientInfoProperties = new Properties();
|
}
|
I suggest populating the properties from the protocol:
org.mariadb.jdbc.MySQLConnection |
private MySQLConnection( MySQLProtocol protocol) {
|
this.protocol = protocol;
|
clientInfoProperties = new Properties();
|
clientInfoProperties.putAll(protocol.getInfo());
|
}
|
and probably a good idea to not include user and password:
org.mariadb.jdbc.Driver |
public Connection connect(final String url, final Properties info) throws SQLException {
|
// snip
|
String userName = info.getProperty("user",jdbcUrl.getUsername());
|
String password = info.getProperty("password",jdbcUrl.getPassword());
|
|
info.remove("user");
|
info.remove("password");
|
 |
MySQLProtocol protocol = new MySQLProtocol(jdbcUrl, userName, password, info);
|
// snip
|
}
|
Attachments
Issue Links
- relates to
-
CONJ-637 java.sql.Driver class is missing DriverPropertyInfo[] getPropertyInfo
- Closed