Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.2.2
-
None
-
The database version isn't relevant since the query is never sent to the db (it fails on the client side)...
Description
There seems to be a regression bug in driver 1.2.2 with the following query that raise an exception (works fine with version 1.2.0):
PreparedStatement ps = c.prepareStatement("insert into t1 (LAST_UPDATE_DATETIME, VERSION) select ?, version from t2");
ps.setTimestamp(1, new java.sql.Timestamp(System.currentTimeMillis()));
ps.executeUpdate();
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1911)
at org.mariadb.jdbc.internal.common.query.MySQLParameterizedQuery.<init>(MySQLParameterizedQuery.java:83)
at org.mariadb.jdbc.MySQLPreparedStatement.<init>(MySQLPreparedStatement.java:90)
at org.mariadb.jdbc.MySQLConnection.prepareStatement(MySQLConnection.java:181)
at com.test.mavenproject5.TestSuite.testMariaDB(TestSuite.java:134)
Attachments
Issue Links
- relates to
-
CONJ-201 Prepared Statement with ? parameters after last ) causes string index out of bounds error
- Closed