we are currently struggling with exceptions thrown when executing prepared queries against MySQL using Vert.x 4.0.3 Sql Client API together with MariaDB Java Client 2.7.2.
We want to switch our code from the legacy JDBC Client API to the new Sql Client API and we are using this API for connecting to different DBs. This works for SQL Server using Microsoft JDBC Driver for SQL Server, MySQL using MySQL Connetor/J and embedded HSQLDB. Because of the GPL license we cannot use MySQL Connector/J, therefore we are using MariaDB Java Client for connecting to MySQL.
Everything was fine with the legacy JDBC Client API but when we changed the code to Sql Client API (all other dependencies stayed at the same version) we started seeing exceptions like this:
java.lang.ArrayIndexOutOfBoundsException: 37
at org.mariadb.jdbc.internal.com.read.Buffer.skipLengthEncodedBytes(Buffer.java:228) ~[mariadb-java-client-2.7.2.jar:?]
at org.mariadb.jdbc.internal.com.read.resultset.ColumnDefinition.getString(ColumnDefinition.java:225) ~[mariadb-java-client-2.7.2.jar:?]
at org.mariadb.jdbc.internal.com.read.resultset.ColumnDefinition.getName(ColumnDefinition.java:243) ~[mariadb-java-client-2.7.2.jar:?]
at org.mariadb.jdbc.MariaDbResultSetMetaData.getColumnLabel(MariaDbResultSetMetaData.java:154) ~[mariadb-java-client-2.7.2.jar:?]
at io.vertx.jdbcclient.impl.actions.JDBCQueryAction.decodeReturnedKeys(JDBCQueryAction.java:188) ~[vertx-jdbc-client-4.0.3.jar:4.0.3]
at io.vertx.jdbcclient.impl.actions.JDBCQueryAction.decode(JDBCQueryAction.java:59) ~[vertx-jdbc-client-4.0.3.jar:4.0.3]
at io.vertx.jdbcclient.impl.actions.JDBCPreparedQuery.execute(JDBCPreparedQuery.java:69) ~[vertx-jdbc-client-4.0.3.jar:4.0.3]
at io.vertx.jdbcclient.impl.actions.JDBCPreparedQuery.execute(JDBCPreparedQuery.java:39) ~[vertx-jdbc-client-4.0.3.jar:4.0.3]
at io.vertx.ext.jdbc.impl.JDBCConnectionImpl.lambda$schedule$3(JDBCConnectionImpl.java:217) ~[vertx-jdbc-client-4.0.3.jar:4.0.3]
at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:179) ~[vertx-core-4.0.3.jar:4.0.3]
at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:96) ~[vertx-core-4.0.3.jar:4.0.3]
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:177) ~[vertx-core-4.0.3.jar:4.0.3]
at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76) ~[vertx-core-4.0.3.jar:4.0.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_282]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_282]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.60.jar:4.1.60.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]
Unfortunately these errors do not occur deterministic, therefore we were not yet able to build a small reproducer.