Bug #100747 | AUTO_INCREMENT IDs fail in updatable prepared statements with useServerPrepStmt | ||
---|---|---|---|
Submitted: | 4 Sep 2020 20:25 | Modified: | 5 Oct 2020 21:12 |
Reporter: | Björn Voigt (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 8.0.21 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | auto_increment, jdbc, prepared statement, ResultSet |
[4 Sep 2020 20:25]
Björn Voigt
[4 Sep 2020 20:28]
Björn Voigt
This demo shows the bug with Connector/J 8.0.21 (works with 5.1.49)
Attachment: ConnectorJBug100747.java (text/x-java), 3.25 KiB.
[4 Sep 2020 20:28]
Björn Voigt
(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
[4 Sep 2020 21:02]
Björn Voigt
The stacktrace (within ' ' there is an unprintable character in original stacktrace)
Attachment: stacktrace1.log (text/x-log), 947 bytes.
[5 Sep 2020 5:19]
MySQL Verification Team
Hello Björn, Thank you for the report and test case. Verified as described. regards, Umesh
[5 Oct 2020 21:12]
Björn Voigt
The bug could be also triggered by non-key Integer columns. See ConnectorJBug100747B.java. The driver source code shows that internal representations of server-prepared and client-prepared statement are copied in this use-case. This could not work for numbers.
[5 Oct 2020 21:14]
Björn Voigt
This demo shows the bug with Connector/J 8.0.21 and an Integer column
Attachment: ConnectorJBug100747B.java (text/x-java), 2.17 KiB.
[5 Oct 2020 21:17]
Björn Voigt
The stacktrace for example ConnectorJBug100747B.java
Attachment: stacktrace2.log (text/x-log), 891 bytes.