Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.1.7
-
None
-
None
Description
Documentation at https://mariadb.com/kb/en/mariadb/client-libraries/mariadb-java-client/about-the-mariadb-java-client/ specifies that "user" and "password" are valid url parameters.
JDBCUrl.parseConnectorJUrl instantiates both username and password of the resulting JDBCUrl as the empty string, no matter the input. This causes MySQLDataSource to treat the username and password as empty.
private static JDBCUrl parseConnectorJUrl(String url) {
|
if (!url.startsWith("jdbc:mysql://")) {
|
return null;
|
}
|
|
url = url.substring(13);
|
String hostname;
|
String database;
|
String[] tokens = url.split("/");
|
hostname=tokens[0];
|
database=(tokens.length > 1)?tokens[1]:null;
|
return new JDBCUrl("", "", database, HostAddress.parse(hostname));
|
}
|