You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my test case, when I use Statement to execute and then attempt to retrieve the latest GeneratedKeys, I expect to get a value of 3.
However, the returned values are 1 and 2, which are the values I inserted previously. I think this behavior is incorrect. I also have this test case on MariaDB Connector J, and it returns 3. I think 3 may be more reasonable.
Expected Behavior
See bug description.
Current Behavior
See bug description.
Reproduction Steps
@Test
public void test() throws SQLException {
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test?user=user&password=password");
Statement stmt = con.createStatement();
stmt.addBatch("DROP TABLE IF EXISTS table0_0;");
stmt.addBatch("CREATE TABLE table0_0(id INT AUTO_INCREMENT PRIMARY KEY,value INT);");
stmt.addBatch("INSERT INTO table0_0 VALUES(1, -179653912)");
stmt.addBatch("INSERT INTO table0_0 VALUES(2, 1207965915)");
stmt.executeBatch();
stmt.executeUpdate("INSERT INTO table0_0 (value) VALUES(667711856)", Statement.RETURN_GENERATED_KEYS);
ResultSet rs = stmt.getGeneratedKeys();
while (rs.next()) {
System.out.println(rs.getInt(1));
}
}
Possible Solution
No response
Additional Information/Context
No response
The AWS JDBC Driver for MySQL version used
1.1.10
JDK version used
20
Operating System and version
Windows
The text was updated successfully, but these errors were encountered:
A fix for this issue (PR #490) was merged recently and was included in the latest release of the driver, version 1.1.11. Could you kindly check it out and let us know if the issue persists?
I wanted to check in and see if you were able to verify that the fix resolved the issue. If there are no further updates on this ticket in the next few days, it will be closed. However, if you have other questions or concerns, please feel free to reach out again.
Describe the bug
In my test case, when I use Statement to execute and then attempt to retrieve the latest GeneratedKeys, I expect to get a value of 3.
However, the returned values are 1 and 2, which are the values I inserted previously. I think this behavior is incorrect. I also have this test case on MariaDB Connector J, and it returns 3. I think 3 may be more reasonable.
Expected Behavior
See bug description.
Current Behavior
See bug description.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
The AWS JDBC Driver for MySQL version used
1.1.10
JDK version used
20
Operating System and version
Windows
The text was updated successfully, but these errors were encountered: