Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
3.1.4
-
None
Description
See this test case:
@Test
|
public void test() throws SQLException { |
String url = "jdbc:mariadb://localhost:3366/test?user=user&password=password"; |
Connection con = DriverManager.getConnection(url);
|
Statement stmt = con.createStatement();
|
stmt.execute("DROP TABLE IF EXISTS t0"); |
stmt.execute("CREATE TABLE t0(c0 REAL SIGNED PRIMARY KEY NOT NULL) engine=InnoDB"); |
stmt.close();
|
PreparedStatement pstmt = con.prepareStatement("INSERT INTO t0 VALUES(?)"); |
for (int i = 0; i < 2; i++) { |
pstmt.setDouble(1, i); |
pstmt.addBatch();
|
}
|
int[] res = pstmt.executeBatch(); |
for (int t : res) { |
System.out.println(t);
|
}
|
}
|
I expect pstmt.executeBatch() returns 1, 1. However, Mariadb Connector J returns -2, -2.