Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL)
-
None
Description
When using COM_STMT_BULK_EXECUTE , the first "couple" are not taken in account.
Statement stmt = sharedConnection.createStatement();
|
stmt.execute("CREATE TEMPORARY TABLE test_replace (id int not null primary key, active BOOLEAN)") |
stmt.execute("insert into test_replace values (1, false), (2, false), (3, false)"); |
 |
try (PreparedStatement preparedStatement = sharedConnection.prepareStatement("replace into test_replace (id, active) values (?, ?)")) { |
preparedStatement.setInt(1, 1); |
preparedStatement.setBoolean(2, true); |
preparedStatement.addBatch();
|
preparedStatement.setInt(1, 2); |
preparedStatement.setBoolean(2, true); |
preparedStatement.addBatch();
|
preparedStatement.setInt(1, 3); |
preparedStatement.setBoolean(2, true); |
preparedStatement.addBatch();
|
preparedStatement.setInt(1, 4); |
preparedStatement.setBoolean(2, true); |
preparedStatement.addBatch();
|
preparedStatement.executeBatch();
|
}
|
expected in database :
1 true |
2 true |
3 true |
4 true |
but is
1 false |
2 true |
3 true |
4 true |
The byte send to server are ok, according to COM_STMT_BULK_EXECUTE protocol :
27 00 00 00 FA 01 00 00 00 80 FF 03 00 01 00 00 '............... |
01 00 00 00 00 01 00 02 00 00 00 00 01 00 03 00 ................ |
00 00 00 01 00 04 00 00 00 00 01 ........... |
(tested with server 10.3.7 and 10.2.14)
Attachments
Issue Links
- relates to
-
CONJ-635 first REPLACE INTO command from a batch is ignored
- Closed