Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.3.0, 1.3.2, 1.3.1
-
None
Description
Hi,
I'm going to use the MariaDB Connector/J with failover options,
but when I use URL format like 'jdbc:mariadb:failover://', UrlParser throws an exception.
(Connector/J 1.3.2)
java.sql.SQLException: url parameter error '' is a unknown parameter in the url jdbc:mysql::failover://192.168.33.10:3306,192.168.33.11:3306/testj
|
at org.mariadb.jdbc.UrlParser.parseInternal(UrlParser.java:193) ~[mariadb-java-client-1.3.2.jar:na]
|
at org.mariadb.jdbc.UrlParser.parse(UrlParser.java:146) ~[mariadb-java-client-1.3.2.jar:na]
|
at org.mariadb.jdbc.Driver.connect(Driver.java:95) ~[mariadb-java-client-1.3.2.jar:na]
|
...
|
'jdbc:mysql:failover://' works, so it’s not a big problem, but I think it should be fixed.
I think this is the cause:
https://github.com/MariaDB/mariadb-connector-j/blob/1.3.2/src/main/java/org/mariadb/jdbc/UrlParser.java#L146
I'll send a pull request to fix this on GitHub later.
Thanks.