Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.0.1
-
None
Description
MariaDB Connector/J 2.0.1 is unable to connect to a MySQL 5.1.73 server. In Java 8, attempting to connect like this:
try (Connection c = DriverManager.getConnection(url, user, new String(password))) { |
System.out.printf("Connection class:%n%s%n", c.getClass().getName()); |
}
|
where url is something like this:
"jdbc:mariadb://my.host.name:3306/MYDB"
|
results in the following stack trace:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
|
at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.readNextValue(SelectResultSet.java:481)
|
at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.fetchAllResults(SelectResultSet.java:338)
|
at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.<init>(SelectResultSet.java:209)
|
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readResultSet(AbstractQueryProtocol.java:1273)
|
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1033)
|
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:982)
|
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.readRequestSessionVariables(AbstractConnectProtocol.java:498)
|
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.readPipelineAdditionalData(AbstractConnectProtocol.java:544)
|
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:410)
|
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1013)
|
at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:481)
|
at org.mariadb.jdbc.Driver.connect(Driver.java:103)
|
at java.sql.DriverManager.getConnection(DriverManager.java:664)
|
at java.sql.DriverManager.getConnection(DriverManager.java:247)
|
at Main.main(Main.java:16)
|
This issue was initially a question.